From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: xfs <linux-xfs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] vfs: check ->get_link return value
Date: Mon, 1 Oct 2018 19:07:12 -0700 [thread overview]
Message-ID: <20181002020712.GB6706@magnolia> (raw)
In-Reply-To: <20181002013105.GL32577@ZenIV.linux.org.uk>
On Tue, Oct 02, 2018 at 02:31:06AM +0100, Al Viro wrote:
> On Mon, Oct 01, 2018 at 03:45:00PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Teach callers of inode->i_op->get_link in the vfs code to check for a
> > NULL return value and return an error status instead of blindly
> > dereferencing the returned NULL pointer.
>
> IDGI. If you want it to fail with -EUCLEAN, then by all means return
> it as you would any other error.
>
> I've no problem with "fs image is fucked, return an error". However,
> "fs driver is fucked, paper over that if we'd caught one of the
> symptoms" is a different story.
This whole thread got started from a suggestion Christoph made about a
patch I had to fix the XFS side to return an error instead of a null
pointer:
https://www.spinics.net/lists/linux-xfs/msg21372.html
I hadn't thought it was all /that/ necessary to fix the vfs since there
are plenty of other places where the vfs assumes the fs knows what it's
doing and sneezes hard if not...
> NAK in that form. If we have that happen, let the damn thing oops.
> Quietly papering over bugs like that is just plain wrong.
Sounds good to me! Patch withdrawn. :)
--D
next prev parent reply other threads:[~2018-10-02 8:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-01 22:45 [PATCH] vfs: check ->get_link return value Darrick J. Wong
2018-10-01 23:21 ` Dave Chinner
2018-10-01 23:33 ` Darrick J. Wong
2018-10-01 23:53 ` Dave Chinner
2018-10-01 23:52 ` Matthew Wilcox
2018-10-02 0:23 ` Darrick J. Wong
2018-10-02 1:54 ` Al Viro
2018-10-02 1:31 ` Al Viro
2018-10-02 2:07 ` Darrick J. Wong [this message]
2018-10-02 2:47 ` Al Viro
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=20181002020712.GB6706@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).