All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Kravetz <mike.kravetz@oracle.com>
To: stable@vger.kernel.org, linux-mm@kvack.org
Cc: Yang Shi <shy828301@gmail.com>,
	Naoya Horiguchi <naoya.horiguchi@linux.dev>,
	James Houghton <jthoughton@google.com>,
	Oscar Salvador <osalvador@suse.de>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Muchun Song <songmuchun@bytedance.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH 0/6] hwpoison, shmem, hugetlb: fix data loss issue 5.10.y
Date: Wed, 23 Nov 2022 11:54:02 -0800	[thread overview]
Message-ID: <20221123195408.135161-1-mike.kravetz@oracle.com> (raw)

This is a request for adding the following patches to stable 5.10.y.

Poisoned shmem and hugetlb pages are removed from the pagecache.
Subsequent access to the offset in the file results in a NEW zero
filled page.  Application code does not get notified of the data
loss, and the only 'clue' is a message in the system log.  Data
loss has been experienced by real users.

This was addressed upstream.  Most commits were marked for backports,
but some were not.  This was discussed here [1] and here [2].

Patches apply cleanly to v5.4.224 and pass tests checking for this
specific data loss issue.  LTP mm tests show no regressions.

All patches except 4 "mm: hwpoison: handle non-anonymous THP correctly"
required a small bit of change to apply correctly: mostly for context.

linux-mm Cc'ed as it would be great to get at least an ACK from others
familiar with this issue.

[1] https://lore.kernel.org/linux-mm/Y2UTUNBHVY5U9si2@monkey/
[2] https://lore.kernel.org/stable/20221114131403.GA3807058@u2004/

James Houghton (1):
  hugetlbfs: don't delete error page from pagecache

Yang Shi (5):
  mm: hwpoison: remove the unnecessary THP check
  mm: filemap: check if THP has hwpoisoned subpage for PMD page fault
  mm: hwpoison: refactor refcount check handling
  mm: hwpoison: handle non-anonymous THP correctly
  mm: shmem: don't truncate page if memory failure happens

 fs/hugetlbfs/inode.c       |  13 ++--
 include/linux/page-flags.h |  23 ++++++
 mm/huge_memory.c           |   2 +
 mm/hugetlb.c               |   4 +
 mm/memory-failure.c        | 153 ++++++++++++++++++++++++-------------
 mm/memory.c                |   9 +++
 mm/page_alloc.c            |   4 +-
 mm/shmem.c                 |  51 +++++++++++--
 8 files changed, 191 insertions(+), 68 deletions(-)

-- 
2.38.1


             reply	other threads:[~2022-11-23 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-23 19:54 Mike Kravetz [this message]
2022-11-23 19:54 ` [PATCH 1/6] mm: hwpoison: remove the unnecessary THP check Mike Kravetz
2022-11-23 19:54 ` [PATCH 2/6] mm: filemap: check if THP has hwpoisoned subpage for PMD page fault Mike Kravetz
2022-11-23 19:54 ` [PATCH 3/6] mm: hwpoison: refactor refcount check handling Mike Kravetz
2022-11-23 19:54 ` [PATCH 4/6] mm: hwpoison: handle non-anonymous THP correctly Mike Kravetz
2022-11-23 19:54 ` [PATCH 5/6] mm: shmem: don't truncate page if memory failure happens Mike Kravetz
2022-11-23 19:54 ` [PATCH 6/6] hugetlbfs: don't delete error page from pagecache Mike Kravetz
2023-02-20 11:38 ` [PATCH 0/6] hwpoison, shmem, hugetlb: fix data loss issue 5.10.y Shuai Xue

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=20221123195408.135161-1-mike.kravetz@oracle.com \
    --to=mike.kravetz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jthoughton@google.com \
    --cc=linmiaohe@huawei.com \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@linux.dev \
    --cc=osalvador@suse.de \
    --cc=shy828301@gmail.com \
    --cc=songmuchun@bytedance.com \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.