linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ajay Garg <ajaygargnsit@gmail.com>,
	hughd@google.com, akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH] mm: shmem: do not call PageHWPoison on a ERR-page
Date: Sat, 13 Nov 2021 10:21:15 -0700	[thread overview]
Message-ID: <e87601bd-21c4-00b0-9500-054bca8abced@kernel.dk> (raw)
In-Reply-To: <628a49dc-f6f7-5aa4-8a4d-4f2ed19b7f3f@kernel.dk>

On 11/11/21 10:59 AM, Jens Axboe wrote:
> On 11/11/21 10:45 AM, Ajay Garg wrote:
>> Another report of the issue (different call-flow, but the same error
>> at "shmem_read_mapping_page_gfp") at :
>> https://lore.kernel.org/lkml/6bb8c25c-cdcf-8bca-3db2-9871a90d518f@kernel.dk/T/#m52d98b6bdb05764524a118b15cec048b34e5ca76
>>
>> with a tentative approval for the patch :
>> https://lore.kernel.org/lkml/6bb8c25c-cdcf-8bca-3db2-9871a90d518f@kernel.dk/T/#m24c2888a879d428cde5b34c43838301de544eb7e
> 
> Andrew, I've hit this multiple times on resume on my laptop, and it's
> a very apparent bug in that b9d02f1bdd98 commit that it doesn't factor
> in error pointers. My oops clearly shows it being one too, with ...fff4
> being the dereference address.
> 
> Can we get this pushed upstream asap if you're fine with this patch?

Maybe Andrew is out - Linus, if you follow this thread, there are two
proposed fixes for this. It'd be nice to have one of them in -rc1.

Backstory is that commit:

commit b9d02f1bdd98f38e6e5ecacc9786a8f58f3f8b2c
Author: Yang Shi <shy828301@gmail.com>
Date:   Fri Nov 5 13:41:10 2021 -0700

    mm: shmem: don't truncate page if memory failure happens

adds a pretty obvious error, where PageHWPoison() is called on an error
pointer in shmem_read_mapping_page_gfp(). I can trivially hit this oops
on resuming the laptop.

-- 
Jens Axboe


  reply	other threads:[~2021-11-13 17:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-11  8:46 [PATCH] mm: shmem: do not call PageHWPoison on a ERR-page Ajay Garg
2021-11-11 11:06 ` Muchun Song
2021-11-11 11:40   ` Ajay Garg
2021-11-11 12:11     ` Muchun Song
2021-11-11 12:21       ` Ajay Garg
2021-11-11 13:09         ` Muchun Song
2021-11-11 18:42   ` Yang Shi
2021-11-11 17:45 ` Ajay Garg
2021-11-11 17:59   ` Jens Axboe
2021-11-13 17:21     ` Jens Axboe [this message]
2021-11-13 20:16       ` Linus Torvalds
2021-11-13 20:21         ` Jens Axboe
2021-11-13 20:23         ` Linus Torvalds
2021-11-13 22:29           ` Yang Shi
2021-11-13 22:58             ` Linus Torvalds
2021-11-14  3:10               ` Yang Shi

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=e87601bd-21c4-00b0-9500-054bca8abced@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=ajaygargnsit@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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).