From: PanBian <bianpan2016@163.com>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.or
Subject: Re: [PATCH] namei: free new_dentry late
Date: Sun, 25 Nov 2018 08:11:33 +0800 [thread overview]
Message-ID: <20181125001133.GA76098@bp> (raw)
In-Reply-To: <20181124195117.GB2217@ZenIV.linux.org.uk>
On Sat, Nov 24, 2018 at 07:51:17PM +0000, Al Viro wrote:
> On Sat, Nov 24, 2018 at 05:23:24PM +0800, Pan Bian wrote:
> > After calling dput(new_dentry), new_dentry is passed to fsnotify_move.
> > This may result in a use-after-free bug. This patch moves the put
> > operation late.
> >
> > Fixes: 49d31c2f389a("dentry name snapshots")
>
> What does that commit have to do with anything? The broken part is
> fsnotify_move(new_dir, old_dir, old_dentry->d_name.name,
> new_is_dir, NULL, new_dentry);
> and it predates that commit by 3 years - it came from da1ce0670c14 ("vfs: add
> cross-rename")...
Thank you for pointing out my mistake! I will correct it and resubmit
the patch!
Best regards,
Pan
prev parent reply other threads:[~2018-11-25 11:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-24 9:23 [PATCH] namei: free new_dentry late Pan Bian
2018-11-24 19:51 ` Al Viro
2018-11-25 0:11 ` PanBian [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=20181125001133.GA76098@bp \
--to=bianpan2016@163.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.or \
--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 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.