summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/nfit
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-08-18 16:24:27 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2020-09-24 12:57:38 +0200
commitfe205d984e7730f4d21f6f8ebc60f0698404ac31 (patch)
tree041a4895c5b2f1666246cc8568ed7ec9e9502965 /drivers/acpi/nfit
parentACPI: Do not create new NUMA domains from ACPI static tables that are not SRAT (diff)
downloadlinux-fe205d984e7730f4d21f6f8ebc60f0698404ac31.tar.xz
linux-fe205d984e7730f4d21f6f8ebc60f0698404ac31.zip
ACPI: Remove side effect of partly creating a node in acpi_map_pxm_to_online_node()
While this function will only return an online node, it can have the side effect of partially creating a new node. The existing comments suggest this is intentional, but the usecases of this function are related to NFIT and HMAT parsing, neither of which should be able to define new nodes. One route by which the existing behaviour would cause a crash is to have a _PXM entry in ACPI DSDT attempt to place a device within this partly created proximity domain. A subsequent call to devm_kzalloc() or similar would result in an attempt to allocate memory on a node for which zone lists have not been set up and a NULL pointer dereference. Prevent such cases by switching to pxm_to_node() within acpi_map_pxm_to_online_node() which cannot cause a new node to be partly created. If one would previously have been created we now return NO_NUMA_NODE. Documentation updated to reflect this change. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Hanjun Guo <guohanjun@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/nfit')
0 files changed, 0 insertions, 0 deletions