Commit 244969a3 authored by Oscar Salvador's avatar Oscar Salvador Committed by Yang Yingliang
Browse files

mm,hwpoison: drain pcplists before bailing out for non-buddy zero-refcount page

mainline inclusion
from linux-v5.11-rc1
commit 17e395b6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4LE22


CVE: NA

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

A page with 0-refcount and !PageBuddy could perfectly be a pcppage.
Currently, we bail out with an error if we encounter such a page, meaning
that we do not handle pcppages neither from hard-offline nor from
soft-offline path.

Fix this by draining pcplists whenever we find this kind of page and retry
the check again.  It might be that pcplists have been spilled into the
buddy allocator and so we can handle it.

Signed-off-by: default avatarOscar Salvador <osalvador@suse.de>
Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Signed-off-by: default avatarMa Wupeng <mawupeng1@huawei.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 24f70c68
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment