]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/mm, mm/hwpoison: Fix the unmap kernel 1:1 pages check condition
authorluofei <luofei@unicloud.com>
Tue, 8 Feb 2022 03:20:28 +0000 (22:20 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Feb 2022 07:43:36 +0000 (08:43 +0100)
commit92f72aed87c029beed9e4093c4a13d1fc746ac90
tree0c5a3227679a8c261d34adcaf5c2045234de539b
parente6f580d0b3349646d4ee1ce0057eb273e8fb7e2e
x86/mm, mm/hwpoison: Fix the unmap kernel 1:1 pages check condition

When fd0e786d9d09 ("x86/mm, mm/hwpoison: Don't unconditionally unmap
kernel 1:1 pages") was backported to 4.14.y, the logic was reversed when
calling memory_failure() to determine whether it needs to unmap the
kernel page. Only when memory_failure() returns successfully, the kernel
page can be unmapped.

Signed-off-by: luofei <luofei@unicloud.com>
Cc: stable@vger.kernel.org #v4.14.x
Cc: stable@vger.kernel.org #v4.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/mcheck/mce.c