From: Matthew Wilcox <willy@infradead.org>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: YANG LI <abaci-bugfix@linux.alibaba.com>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs: fix: second lock in function d_prune_aliases().
Date: Wed, 30 Dec 2020 21:36:36 +0000 [thread overview]
Message-ID: <20201230213636.GA18640@casper.infradead.org> (raw)
In-Reply-To: <20201230200449.GF3579531@ZenIV.linux.org.uk>
On Wed, Dec 30, 2020 at 08:04:49PM +0000, Al Viro wrote:
> On Wed, Dec 30, 2020 at 03:01:25PM +0800, YANG LI wrote:
> > Goto statement jumping will cause lock to be executed again without
> > executing unlock, placing the lock statement in front of goto
> > label to fix this problem.
> >
> > Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
> > Reported-by: Abaci <abaci@linux.alibaba.com>
>
> I am sorry, but have you even attempted to trigger that codepath?
> Just to test your patch...
>
> FWIW, the patch is completely broken. Obviously so, since you
> have dput() done just before goto restart and dput() in very
> much capable of blocking. It should never be called with spinlocks
> held. And if you look at __dentry_kill() (well, dentry_unlink_inode()
> called by __dentry_kill()), you will see that it bloody well *DOES*
> drop inode->i_lock.
Not only that, but the function is even _annotated_ to that effect.
So this 'abaci' tool you have isn't even capable of the bare minimum.
prev parent reply other threads:[~2020-12-30 21:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 7:01 [PATCH] fs: fix: second lock in function d_prune_aliases() YANG LI
2020-12-30 8:27 ` Li, Hao
2020-12-30 20:04 ` Al Viro
2020-12-30 21:36 ` Matthew Wilcox [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=20201230213636.GA18640@casper.infradead.org \
--to=willy@infradead.org \
--cc=abaci-bugfix@linux.alibaba.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@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 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.