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] [day] [month] [year] [list]
Message-ID: <87k0zoom4d.fsf@mail.parknet.co.jp>
Date:   Tue, 30 Jun 2020 19:59:14 +0900
From:   OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     fengyubo <fengyubo3@...wei.com>, <fangwei1@...wei.com>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] fatfs: switch write_lock to read_lock in
 fat_ioctl_get_attributes

fengyubo <fengyubo3@...wei.com> writes:

> From: Yubo Feng <fengyubo3@...wei.com>
>
> There is no necessery to hold write_lock in fat_ioctl_get_attributes.
> write_lock may make an impact on concurrency of fat_ioctl_get_attributes.
>
> Signed-off-by: Yubo Feng <fengyubo3@...wei.com>

Looks good.

Acked-by: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>

> ---
>  fs/fat/file.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/fat/file.c b/fs/fat/file.c
> index 42134c5..f9ee27c 100644
> --- a/fs/fat/file.c
> +++ b/fs/fat/file.c
> @@ -25,9 +25,9 @@ static int fat_ioctl_get_attributes(struct inode *inode, u32 __user *user_attr)
>  {
>  	u32 attr;
>  
> -	inode_lock(inode);
> +	inode_lock_shared(inode);
>  	attr = fat_make_attrs(inode);
> -	inode_unlock(inode);
> +	inode_unlock_shared(inode);
>  
>  	return put_user(attr, user_attr);
>  }

-- 
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ