All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Matthew Wilcox <willy@infradead.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 15:30:18 -0700	[thread overview]
Message-ID: <Y1hjehfVft6oUO6c@magnolia> (raw)
In-Reply-To: <Y1gkzZzAl1QilpVe@casper.infradead.org>

On Tue, Oct 25, 2022 at 07:02:53PM +0100, Matthew Wilcox wrote:
> 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().

Yes, that's why I don't want to leave the !fsdax stub returning zero.

--D

> 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.

      reply	other threads:[~2022-10-25 22:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 21:32 [PATCH] xfs: fix incorrect return type for fsdax fault handlers 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
2022-10-25 22:30       ` Darrick J. Wong [this message]

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=Y1hjehfVft6oUO6c@magnolia \
    --to=djwong@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ruansy.fnst@fujitsu.com \
    --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 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.