diff options
Diffstat (limited to 'meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch')
-rw-r--r-- | meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch b/meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch new file mode 100644 index 000000000..53952aef9 --- /dev/null +++ b/meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | [PATCH] return 0 if distance_table is NULL | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | read_distance_table() maybe return 0, but distance_table is not set, | ||
6 | if distance_table is used, and will lead to SEGFAULT | ||
7 | |||
8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
9 | --- | ||
10 | distance.c | 2 ++ | ||
11 | 1 file changed, 2 insertions(+) | ||
12 | |||
13 | diff --git a/distance.c b/distance.c | ||
14 | index 4a26972..c6ca021 100755 | ||
15 | --- a/distance.c | ||
16 | +++ b/distance.c | ||
17 | @@ -113,6 +113,8 @@ int numa_distance(int a, int b) | ||
18 | int err = read_distance_table(); | ||
19 | if (err < 0) | ||
20 | return 0; | ||
21 | + if (!distance_table) | ||
22 | + return 0; | ||
23 | } | ||
24 | return distance_table[a * distance_numnodes + b]; | ||
25 | } | ||
26 | -- | ||
27 | 1.7.10.4 | ||
28 | |||