From: Andrew Morton <akpm@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: Tuo Cao <91tuocao@gmail.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: folio-compat: fix bug for pagecache_get_page
Date: Tue, 18 Oct 2022 13:48:34 -0700 [thread overview]
Message-ID: <20221018134834.97e685f9a9445c4553ce158b@linux-foundation.org> (raw)
In-Reply-To: <Y066q/QNrBSRjPux@casper.infradead.org>
On Tue, 18 Oct 2022 15:39:39 +0100 Matthew Wilcox <willy@infradead.org> wrote:
> On Tue, Oct 18, 2022 at 10:36:39PM +0800, Tuo Cao wrote:
> > The folio returned from __filemap_get_folio may be a NULL, it will
> > causes the kernel crash when access folio->page.
>
> This is not a bug. &folio->page does not dereference folio but performs
> pointer arithmetic.
This is the third attempt to "fix" this. So far. I think we should
take the hint and make the check for a null pointer more explicit.
next prev parent reply other threads:[~2022-10-18 20:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-18 14:36 Tuo Cao
2022-10-18 14:39 ` Matthew Wilcox
2022-10-18 20:48 ` Andrew Morton [this message]
2022-10-19 13:13 ` Matthew Wilcox
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=20221018134834.97e685f9a9445c4553ce158b@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=91tuocao@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=willy@infradead.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
all inboxes | Powered by JetHome®