linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: YANG LI <abaci-bugfix@linux.alibaba.com>
Cc: 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 20:04:49 +0000	[thread overview]
Message-ID: <20201230200449.GF3579531@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1609311685-99562-1-git-send-email-abaci-bugfix@linux.alibaba.com>

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.

NAK.

  parent reply	other threads:[~2020-12-30 20:05 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 [this message]
2020-12-30 21:36   ` Matthew Wilcox

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=20201230200449.GF3579531@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=abaci-bugfix@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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).