From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, James Morse <james.morse@arm.com>,
Punit Agrawal <punit.agrawal@arm.com>,
Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH 3.18 28/32] mm/memory-failure.c: use compound_head() flags for huge pages
Date: Mon, 19 Jun 2017 23:21:12 +0800 [thread overview]
Message-ID: <20170619152037.237521304@linuxfoundation.org> (raw)
In-Reply-To: <20170619152035.750974520@linuxfoundation.org>
3.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: James Morse <james.morse@arm.com>
commit 7258ae5c5a2ce2f5969e8b18b881be40ab55433d upstream.
memory_failure() chooses a recovery action function based on the page
flags. For huge pages it uses the tail page flags which don't have
anything interesting set, resulting in:
> Memory failure: 0x9be3b4: Unknown page state
> Memory failure: 0x9be3b4: recovery action for unknown page: Failed
Instead, save a copy of the head page's flags if this is a huge page,
this means if there are no relevant flags for this tail page, we use the
head pages flags instead. This results in the me_huge_page() recovery
action being called:
> Memory failure: 0x9b7969: recovery action for huge page: Delayed
For hugepages that have not yet been allocated, this allows the hugepage
to be dequeued.
Fixes: 524fca1e7356 ("HWPOISON: fix misjudgement of page_action() for errors on mlocked pages")
Link: http://lkml.kernel.org/r/20170524130204.21845-1-james.morse@arm.com
Signed-off-by: James Morse <james.morse@arm.com>
Tested-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Punit Agrawal <punit.agrawal@arm.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/memory-failure.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1189,7 +1189,10 @@ int memory_failure(unsigned long pfn, in
* page_remove_rmap() in try_to_unmap_one(). So to determine page status
* correctly, we save a copy of the page flags at this time.
*/
- page_flags = p->flags;
+ if (PageHuge(p))
+ page_flags = hpage->flags;
+ else
+ page_flags = p->flags;
/*
* unpoison always clear PG_hwpoison inside page lock
next prev parent reply other threads:[~2017-06-19 15:21 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 15:20 [PATCH 3.18 00/32] 3.18.58-stable review Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 01/32] s390/vmem: fix identity mapping Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 02/32] partitions/msdos: FreeBSD UFS2 file systems are not recognized Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 03/32] Call echo service immediately after socket reconnect Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 04/32] net: xilinx_emaclite: fix freezes due to unordered I/O Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 05/32] net: xilinx_emaclite: fix receive buffer overflow Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 06/32] ipv6: Handle IPv4-mapped src to in6addr_any dst Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 07/32] ipv6: Inhibit IPv4-mapped src address on the wire Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 08/32] log2: make order_base_2() behave correctly on const input value zero Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 09/32] sparc64: make string buffers large enough Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 10/32] configfs: Fix race between create_link and configfs_rmdir Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 11/32] can: gs_usb: fix memory leak in gs_cmd_reset() Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 13/32] [media] vb2: Fix an off by one error in vb2_plane_vaddr Greg Kroah-Hartman
2017-06-19 15:20 ` [PATCH 3.18 14/32] mac80211: dont look at the PM bit of BAR frames Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 16/32] x86/mm/32: Set the __vmalloc_start_set flag in initmem_init() Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 17/32] mfd: omap-usb-tll: Fix inverted bit use for USB TLL mode Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 18/32] staging: rtl8188eu: prevent an underflow in rtw_check_beacon_data() Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 19/32] iio: proximity: as3935: recalibrate RCO after resume Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 20/32] USB: hub: fix SS max number of ports Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 21/32] usb: core: fix potential memory leak in error path during hcd creation Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 22/32] [media] pvrusb2: reduce stack usage pvr2_eeprom_analyze() Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 23/32] USB: gadget: dummy_hcd: fix hub-descriptor removable fields Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 24/32] usb: r8a66597-hcd: select a different endpoint on timeout Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 25/32] usb: r8a66597-hcd: decrease timeout Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 26/32] drivers/misc/c2port/c2port-duramar2150.c: checking for NULL instead of IS_ERR() Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 27/32] usb: xhci: ASMedia ASM1042A chipset need shorts TX quirk Greg Kroah-Hartman
2017-06-19 15:21 ` Greg Kroah-Hartman [this message]
2017-06-19 15:21 ` [PATCH 3.18 29/32] swap: cond_resched in swap_cgroup_prepare() Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 30/32] genirq: Release resources in __setup_irq() error path Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 31/32] alarmtimer: Rate limit periodic intervals Greg Kroah-Hartman
2017-06-19 15:21 ` [PATCH 3.18 32/32] mm: larger stack guard gap, between vmas Greg Kroah-Hartman
2017-06-21 5:49 ` Hugh Dickins
2017-06-21 5:59 ` Willy Tarreau
2017-06-21 6:10 ` Hugh Dickins
2017-06-21 7:24 ` Willy Tarreau
2017-06-24 15:04 ` Greg Kroah-Hartman
2017-06-19 22:47 ` [PATCH 3.18 00/32] 3.18.58-stable review Guenter Roeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170619152037.237521304@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=james.morse@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=n-horiguchi@ah.jp.nec.com \
--cc=punit.agrawal@arm.com \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).