Re: [PATCH] xfs: fix incorrect return type for fsdax fault handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux