]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.14-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Feb 2022 13:14:05 +0000 (14:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Feb 2022 13:14:05 +0000 (14:14 +0100)
added patches:
x86-mm-mm-hwpoison-fix-the-unmap-kernel-1-1-pages-check-condition.patch

queue-4.14/series
queue-4.14/x86-mm-mm-hwpoison-fix-the-unmap-kernel-1-1-pages-check-condition.patch [new file with mode: 0644]

index 8a9e665bdadc590de836c14e9a308e6fa200c1fc..eeb922d58f92ef2ff1c9b6e39d3361c6869e8436 100644 (file)
@@ -1,2 +1,3 @@
 cgroup-v1-require-capabilities-to-set-release_agent.patch
 moxart-fix-potential-use-after-free-on-remove-path.patch
+x86-mm-mm-hwpoison-fix-the-unmap-kernel-1-1-pages-check-condition.patch
diff --git a/queue-4.14/x86-mm-mm-hwpoison-fix-the-unmap-kernel-1-1-pages-check-condition.patch b/queue-4.14/x86-mm-mm-hwpoison-fix-the-unmap-kernel-1-1-pages-check-condition.patch
new file mode 100644 (file)
index 0000000..2aa4b1c
--- /dev/null
@@ -0,0 +1,35 @@
+From luofei@unicloud.com  Wed Feb  9 14:10:31 2022
+From: luofei <luofei@unicloud.com>
+Date: Mon, 7 Feb 2022 22:20:28 -0500
+Subject: x86/mm, mm/hwpoison: Fix the unmap kernel 1:1 pages check condition
+To: <stable@vger.kernel.org>, <tony.luck@intel.com>, <bp@alien8.de>, <tglx@linutronix.de>, <mingo@redhat.com>, <hpa@zytor.com>, <x86@kernel.org>
+Cc: <linux-edac@vger.kernel.org>, <linux-kernel@vger.kernel.org>, luofei <luofei@unicloud.com>
+Message-ID: <20220208032028.852302-1-luofei@unicloud.com>
+
+From: luofei <luofei@unicloud.com>
+
+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 |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/mcheck/mce.c
++++ b/arch/x86/kernel/cpu/mcheck/mce.c
+@@ -589,7 +589,7 @@ static int srao_decode_notifier(struct n
+       if (mce_usable_address(mce) && (mce->severity == MCE_AO_SEVERITY)) {
+               pfn = mce->addr >> PAGE_SHIFT;
+-              if (memory_failure(pfn, MCE_VECTOR, 0))
++              if (!memory_failure(pfn, MCE_VECTOR, 0))
+                       mce_unmap_kpfn(pfn);
+       }