projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a68d750
)
sched/topology: Fix off by one bug
author
Peter Zijlstra
<
[email protected]
>
Fri, 2 Nov 2018 13:22:25 +0000
(14:22 +0100)
committer
Ingo Molnar
<
[email protected]
>
Sat, 3 Nov 2018 23:40:03 +0000
(
00:40
+0100)
With the addition of the NUMA identity level, we increased @level by
one and will run off the end of the array in the distance sort loop.
Fixed:
051f3ca02e46
("sched/topology: Introduce NUMA identity node sched domain")
Signed-off-by: Peter Zijlstra (Intel) <
[email protected]
>
Cc: Linus Torvalds <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Cc: Thomas Gleixner <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/sched/topology.c
patch
|
blob
|
history
diff --git
a/kernel/sched/topology.c
b/kernel/sched/topology.c
index 9d74371e4aad86a436c549045be08c2a1ed30853..8d7f15ba59163c3a496f0284c2473a0575d57958 100644
(file)
--- a/
kernel/sched/topology.c
+++ b/
kernel/sched/topology.c
@@
-1337,7
+1337,7
@@
void sched_init_numa(void)
int level = 0;
int i, j, k;
- sched_domains_numa_distance = kzalloc(sizeof(int) *
nr_node_ids
, GFP_KERNEL);
+ sched_domains_numa_distance = kzalloc(sizeof(int) *
(nr_node_ids + 1)
, GFP_KERNEL);
if (!sched_domains_numa_distance)
return;