From: Johannes Berg <johannes@sipsolutions.net>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: v9fs-developer@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is needed
Date: Tue, 02 Aug 2016 07:50:18 +0200 [thread overview]
Message-ID: <1470117018.2665.1.camel@sipsolutions.net> (raw)
In-Reply-To: <20160802003014.GD2356@ZenIV.linux.org.uk>
On Tue, 2016-08-02 at 01:30 +0100, Al Viro wrote:
> On Mon, Aug 01, 2016 at 09:57:17PM +0200, Johannes Berg wrote:
> > The introduction of v9fs_parent_fid() broke v9fs_vfs_rename()
> > since that doesn't just do v9fs_fid_lookup() but rather uses
> > v9fs_fid_clone() on the ->d_parent.
> >
> > I suppose it'd be possible to introduce v9fs_clone_parent_fid()
> > but I decided that just reverting the broken change was better
> > for now.
>
> Sorry for the braino; FWIW, I'd rather add
>
> static inline struct p9_fid *fid_clone(struct p9_fid *fid)
> {
> if (IS_ERR(fid))
> return fid;
> return p9_client_walk(fid, 0, NULL, 1);
> }
>
> and turn those into fid_clone(v9fs_parent_fid(old_dentry)), etc.
That would have required much more looking into what happens than I was
about to do :)
> Has an extra benefit of simplifying several other places. I'll fix
> and post (with credits to you for spotting the bug in question, of
> course).
No objection, I just did the minimum necessary to make my setup not
crash on use-after-free all the time (thanks to slab debug) :)
Thanks,
johannes
prev parent reply other threads:[~2016-08-02 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 19:57 [PATCH] 9p: don't use v9fs_parent_fid() when v9fs_fid_clone() is needed Johannes Berg
2016-08-02 0:30 ` Al Viro
2016-08-02 5:50 ` Johannes Berg [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=1470117018.2665.1.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=v9fs-developer@lists.sourceforge.net \
--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