Re: [PATCH v6] mm/hwpoison: fix race between hugetlb free/demotion and memory_failure_hugetlb()

From: Andrew Morton
Date: Mon Apr 04 2022 - 18:09:01 EST


On Mon, 4 Apr 2022 18:21:31 +0900 Naoya Horiguchi <naoya.horiguchi@xxxxxxxxx> wrote:

> There is a race condition between memory_failure_hugetlb() and hugetlb
> free/demotion, which causes setting PageHWPoison flag on the wrong page.
> The one simple result is that wrong processes can be killed, but another
> (more serious) one is that the actual error is left unhandled, so no one
> prevents later access to it, and that might lead to more serious results
> like consuming corrupted data.

Should this fix be backported into stable kernels?