diff options
author | Miaohe Lin <linmiaohe@huawei.com> | 2022-04-29 09:16:08 +0300 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-04-29 09:16:08 +0300 |
commit | 3f26c88bd66cd8ab1731763c68df7fe23a7671c0 (patch) | |
tree | 9c5ee0b98a77a60040ce32354699b449295e4b51 /lib/ashrdi3.c | |
parent | 69a041ff505806c95b24b8d5cab43e66aacd91e6 (diff) | |
download | linux-3f26c88bd66cd8ab1731763c68df7fe23a7671c0.tar.xz |
mm/migration: fix potential invalid node access for reclaim-based migration
If we failed to setup hotplug state callbacks for mm/demotion:online in
some corner cases, node_demotion will be left uninitialized. Invalid node
might be returned from the next_demotion_node() when doing reclaim-based
migration. Use kcalloc to allocate node_demotion to fix the issue.
Link: https://lkml.kernel.org/r/20220318111709.60311-11-linmiaohe@huawei.com
Fixes: ac16ec835314 ("mm: migrate: support multiple target nodes demotion")
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: "Huang, Ying" <ying.huang@intel.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'lib/ashrdi3.c')
0 files changed, 0 insertions, 0 deletions