etmem:fix kernel stack overflow in do_swapcache_reclaim
euleros inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5GN7K CVE: NA -------------------------------- In the do_swapcache_reclaim interface, there are the following local variables. unsigned long nr[MAX_NUMNODES], unsigned long nr_to_reclaim[MAX_NUMNODES], struct list_head swapcache_list[MAX_NUMNODES], In the kernel, MAX_NUMNODES is defined as follows: Under the x86_64 architecture, CONFIG_NODES_SHIFT is defined as follows: CONFIG_NODES_SHIFT=10 Therefore, under the X86_64 architecture, local variables may cause kernel stack overflow. Modify the above variable acquisition method and change it to dynamic application. Signed-off-by:liubo <liubo254@huawei.com> Reviewed-by:
Miaohe Lin <linmiaohe@huawei.com> Reviewed-by:
wangkefeng <wangkefeng.wang@huawei.com> Signed-off-by:
Laibin Qiu <qiulaibin@huawei.com>
Loading
Please sign in to comment