lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Dec 2020 16:27:27 +0800
From:   "Li, Hao" <lihao2018.fnst@...fujitsu.com>
To:     YANG LI <abaci-bugfix@...ux.alibaba.com>, <viro@...iv.linux.org.uk>
CC:     <linux-fsdevel@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fs: fix: second lock in function d_prune_aliases().

On 2020/12/30 15:01, 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@...ux.alibaba.com>
> Reported-by: Abaci <abaci@...ux.alibaba.com>
> ---
>  fs/dcache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/dcache.c b/fs/dcache.c
> index 97e81a8..bf38446 100644
> --- a/fs/dcache.c
> +++ b/fs/dcache.c
> @@ -1050,6 +1050,6 @@ void d_prune_aliases(struct inode *inode)
>  {
>      struct dentry *dentry;
> -restart:
>      spin_lock(&inode->i_lock);

This inode lock should be released at __dentry_kill->dentry_unlink_inode.

Regards,
Hao Lee

>
> +restart:
>      hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) {
>          spin_lock(&dentry->d_lock);



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ