summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/numactl/numactl/fix-null-pointer.patch
diff options
context:
space:
mode:
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.patch28
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
3Upstream-Status: Pending
4
5read_distance_table() maybe return 0, but distance_table is not set,
6if distance_table is used, and will lead to SEGFAULT
7
8Signed-off-by: Roy Li <rongqing.li@windriver.com>
9---
10 distance.c | 2 ++
11 1 file changed, 2 insertions(+)
12
13diff --git a/distance.c b/distance.c
14index 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--
271.7.10.4
28