Commit 4224f779 authored by Gu Zitao's avatar Gu Zitao Committed by Zheng Zengkai
Browse files

sw64: iommu: fix a bug in calling 'alloc_pages_node'

Sunway inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4SPZD


CVE: NA

-------------------------------

The node id of hose is used to denote topological physical id of PCI
host bridge, however one may start up the machine by command line
'numa=off' to switch off NUMA system, and this case may raise exception
on the node id passed to alloc_pages_node, so let's use dev_to_node(dev)
instead and ensure the correctness of the parameter passed in.

Signed-off-by: Gu Zitao <guzitao@wxiat.com> #openEuler_contributor
Signed-off-by: default avatarLaibin Qiu <qiulaibin@huawei.com>
Reviewed-by: default avatarHanjun Guo <guohanjun@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 5d31a85b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment