From: Greg Kroah-Hartman Date: Fri, 24 Nov 2017 10:14:24 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.4.102~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79c8dc70226f3cd65c3824afad13ef56e4ea646d;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: mm-hwpoison-fixup-mm-check-the-return-value-of-lookup_page_ext-for-all-call-sites.patch --- diff --git a/queue-4.4/mm-hwpoison-fixup-mm-check-the-return-value-of-lookup_page_ext-for-all-call-sites.patch b/queue-4.4/mm-hwpoison-fixup-mm-check-the-return-value-of-lookup_page_ext-for-all-call-sites.patch new file mode 100644 index 00000000000..ca8173e073d --- /dev/null +++ b/queue-4.4/mm-hwpoison-fixup-mm-check-the-return-value-of-lookup_page_ext-for-all-call-sites.patch @@ -0,0 +1,53 @@ +From foo@baz Fri Nov 24 11:13:07 CET 2017 +Date: Fri, 24 Nov 2017 11:13:07 +0100 +To: Greg KH +From: Michal Hocko +Subject: mm, hwpoison: fixup "mm: check the return value of lookup_page_ext for all call sites" + +From: Michal Hocko + + +Backport of the upstream commit f86e4271978b ("mm: check the return +value of lookup_page_ext for all call sites") is wrong for hwpoison +pages. I have accidentally negated the condition for bailout. This +basically disables hwpoison pages tracking while the code still +might crash on unusual configurations when struct pages do not have +page_ext allocated. The fix is trivial to invert the condition. + +Reported-by: Jiri Slaby +Signed-off-by: Michal Hocko +Signed-off-by: Greg Kroah-Hartman + +--- + mm/debug-pagealloc.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/mm/debug-pagealloc.c ++++ b/mm/debug-pagealloc.c +@@ -34,7 +34,7 @@ static inline void set_page_poison(struc + struct page_ext *page_ext; + + page_ext = lookup_page_ext(page); +- if (page_ext) ++ if (!page_ext) + return; + __set_bit(PAGE_EXT_DEBUG_POISON, &page_ext->flags); + } +@@ -44,7 +44,7 @@ static inline void clear_page_poison(str + struct page_ext *page_ext; + + page_ext = lookup_page_ext(page); +- if (page_ext) ++ if (!page_ext) + return; + __clear_bit(PAGE_EXT_DEBUG_POISON, &page_ext->flags); + } +@@ -54,7 +54,7 @@ static inline bool page_poison(struct pa + struct page_ext *page_ext; + + page_ext = lookup_page_ext(page); +- if (page_ext) ++ if (!page_ext) + return false; + return test_bit(PAGE_EXT_DEBUG_POISON, &page_ext->flags); + } diff --git a/queue-4.4/series b/queue-4.4/series new file mode 100644 index 00000000000..c404cbb7611 --- /dev/null +++ b/queue-4.4/series @@ -0,0 +1 @@ +mm-hwpoison-fixup-mm-check-the-return-value-of-lookup_page_ext-for-all-call-sites.patch