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, 14 Apr 2010 12:40:28 +0530
From:	Jaswinder Singh Rajput <jaswinderlinux@...il.com>
To:	Jan Blunck <jblunck@...e.de>
Cc:	Jan Kara <jack@...e.cz>, tytso@....edu,
	Linux-Kernel Mailinglist <linux-kernel@...r.kernel.org>,
	linux-ext4@...r.kernel.org,
	Frederic Weisbecker <fweisbec@...il.com>,
	Arnd Bergmann <arnd@...db.de>,
	Andi Kleen <andi@...stfloor.org>,
	OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
Subject: Re: [PATCH 5/5] ext2: Add ext2_sb_info s_lock spinlock

Hello,

On Tue, Apr 13, 2010 at 2:11 AM, Jan Blunck <jblunck@...e.de> wrote:
> Add a spinlock that protects against concurrent modifications of
> s_mount_state, s_blocks_last, s_overhead_last and the content of the
> superblock's buffer pointed to by sbi->s_es. This is a preparation patch
> for removing the BKL from ext2 in the next patch.
>
> Signed-off-by: Jan Blunck <jblunck@...e.de>
> Cc: Andi Kleen <andi@...stfloor.org>
> Cc: Jan Kara <jack@...e.cz>
> Cc: OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>
> ---
>  fs/ext2/inode.c            |    2 ++
>  fs/ext2/super.c            |   31 +++++++++++++++++++++++++++++--
>  include/linux/ext2_fs_sb.h |    6 ++++++
>  3 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
> index fc13cc1..5d15442 100644
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -1407,9 +1407,11 @@ static int __ext2_write_inode(struct inode *inode, int do_sync)
>                                * created, add a flag to the superblock.
>                                */
>                                lock_kernel();
> +                               spin_lock(&EXT2_SB(sb)->s_lock);
>                                ext2_update_dynamic_rev(sb);
>                                EXT2_SET_RO_COMPAT_FEATURE(sb,
>                                        EXT2_FEATURE_RO_COMPAT_LARGE_FILE);
> +                               spin_unlock(&EXT2_SB(sb)->s_lock);
>                                unlock_kernel();
>                                ext2_write_super(sb);

Do we need both locks (kernel lock and spin lock)

Thanks,
--
JSR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ