提交 61e43f49 编写于 作者: Z Zhou Guanghui 提交者: Zhang Zekun

mm: fix alloc CDM node memory for MPOL_BIND

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I612UG
CVE: NA

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

Memory can be allocated from a specified CDM node only when it is
allowed to apply for memory from the CDM node. Otherwise, memory
will be allocated from other non-CDM nodes that are not allowed by
th cpuset.
Signed-off-by: NZhou Guanghui <zhouguanghui1@huawei.com>
上级 00a465fb
......@@ -3873,7 +3873,8 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
(alloc_flags & ALLOC_CPUSET) &&
!__cpuset_zone_allowed(zone, gfp_mask)
#ifdef CONFIG_COHERENT_DEVICE
&& !(alloc_flags & ALLOC_CDM)
&& (!is_cdm_node(zone->zone_pgdat->node_id) ||
!(alloc_flags & ALLOC_CDM))
#endif
)
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册