From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: xfs <linux-xfs@vger.kernel.org>,
Shiyang Ruan <ruansy.fnst@fujitsu.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [PATCH] xfs: fix incorrect return type for fsdax fault handlers
Date: Tue, 25 Oct 2022 19:02:53 +0100 [thread overview]
Message-ID: <Y1gkzZzAl1QilpVe@casper.infradead.org> (raw)
In-Reply-To: <Y1crWdYUGatxJn+T@magnolia>
On Mon, Oct 24, 2022 at 05:18:33PM -0700, Darrick J. Wong wrote:
> On Mon, Oct 24, 2022 at 10:56:48PM +0100, Matthew Wilcox wrote:
> > On Mon, Oct 24, 2022 at 02:32:18PM -0700, Darrick J. Wong wrote:
> > > Fix the incorrect return type for these two functions, and make the
> > > !fsdax version return SIGBUS since there is no vm_fault_t that maps to
> > > zero.
> >
> > Hmm? You should be able to return 0 without sparse complaining.
>
> Yes I know, but is that the correct return value for "someone is calling
> the wrong function, everything is fubar, please stop the world now"?
No, it's "success, but I didn't bother to lock the page myself, please
do it for me", which doesn't really make any sense. I think in this
case, having not initialised vmf->page, we'd probably take a NULL
ptr dereference in lock_page().
From your changelog, it seemed like you were trying to come up with the
vm_fault_t equivalent of 0, rather than trying to change the semantics
of the !fsdax version.
next prev parent reply other threads:[~2022-10-25 18:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 21:32 Darrick J. Wong
2022-10-24 21:56 ` Matthew Wilcox
2022-10-24 23:22 ` Darrick J. Wong
2022-10-25 0:18 ` Darrick J. Wong
2022-10-25 18:02 ` Matthew Wilcox [this message]
2022-10-25 22:30 ` Darrick J. Wong
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=Y1gkzZzAl1QilpVe@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=djwong@kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=ruansy.fnst@fujitsu.com \
/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