mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 17:00:01 +00:00
powerpc/numa: Avoid possible reference beyond prop. length in find_min_common_depth()
find_min_common_depth() was checking the property length incorrectly. The value is in bytes not cells, and it is using the second entry. Signed-off-By: Milton Miller <miltonm@bga.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
6a4d7a90fc
commit
20fcefe5a0
@ -289,7 +289,7 @@ static int __init find_min_common_depth(void)
|
|||||||
ref_points = of_get_property(rtas_root,
|
ref_points = of_get_property(rtas_root,
|
||||||
"ibm,associativity-reference-points", &len);
|
"ibm,associativity-reference-points", &len);
|
||||||
|
|
||||||
if ((len >= 1) && ref_points) {
|
if ((len >= 2 * sizeof(unsigned int)) && ref_points) {
|
||||||
depth = ref_points[1];
|
depth = ref_points[1];
|
||||||
} else {
|
} else {
|
||||||
dbg("NUMA: ibm,associativity-reference-points not found.\n");
|
dbg("NUMA: ibm,associativity-reference-points not found.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user