Commit 24f70c68 authored by Oscar Salvador's avatar Oscar Salvador Committed by Yang Yingliang
Browse files

mm,hwpoison: Try to narrow window race for free pages

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


CVE: NA

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

Aristeu Rozanski reported that a customer test case started
to report -EBUSY after the hwpoison rework patchset.

There is a race window between spotting a free page and taking it off
its buddy freelist, so it might be that by the time we try to take it off,
the page has been already allocated.

This patch tries to handle such race window by trying to handle the new
type of page again if the page was allocated under us.

Signed-off-by: default avatarOscar Salvador <osalvador@suse.de>
Reported-by: default avatarAristeu Rozanski <aris@ruivo.org>
Tested-by: default avatarAristeu Rozanski <aris@ruivo.org>
Acked-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
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 4b408524
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment