aboutsummaryrefslogtreecommitdiff
path: root/drivers/cxl
diff options
context:
space:
mode:
authorGravatar Alison Schofield <alison.schofield@intel.com> 2024-01-12 12:09:51 -0800
committerGravatar Dan Williams <dan.j.williams@intel.com> 2024-02-16 23:20:34 -0800
commitb626070ffc14acca5b87a2aa5f581db98617584c (patch)
treeb838667101d101ca1b10b6c84b96474fd9145414 /drivers/cxl
parentx86/numa: Fix the address overlap check in numa_fill_memblks() (diff)
downloadlinux-b626070ffc14acca5b87a2aa5f581db98617584c.tar.gz
linux-b626070ffc14acca5b87a2aa5f581db98617584c.tar.bz2
linux-b626070ffc14acca5b87a2aa5f581db98617584c.zip
x86/numa: Fix the sort compare func used in numa_fill_memblks()
The compare function used to sort memblks into starting address order fails when the result of its u64 address subtraction gets truncated to an int upon return. The impact of the bad sort is that memblks will be filled out incorrectly. Depending on the set of memblks, a user may see no errors at all but still have a bad fill, or see messages reporting a node overlap that leads to numa init failure: [] node 0 [mem: ] overlaps with node 1 [mem: ] [] No NUMA configuration found Replace with a comparison that can only result in: 1, 0, -1. Fixes: 8f012db27c95 ("x86/numa: Introduce numa_fill_memblks()") Signed-off-by: Alison Schofield <alison.schofield@intel.com> Acked-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/r/99dcb3ae87e04995e9f293f6158dc8fa0749a487.1705085543.git.alison.schofield@intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl')
0 files changed, 0 insertions, 0 deletions