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: <20080716090342.GQ6239@webber.adilger.int>
Date:	Wed, 16 Jul 2008 03:03:42 -0600
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH, RFC] properly lock group descriptors before	initializing

On Jul 16, 2008  00:26 -0500, Eric Sandeen wrote:
> @@ -105,6 +105,7 @@ read_inode_bitmap(struct super_block *sb
>  	desc = ext4_get_group_desc(sb, block_group, NULL);
>  	if (!desc)
>  		goto error_out;
> +	spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group));
>  	if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) {
>  		bh = sb_getblk(sb, ext4_inode_bitmap(sb, desc));
>  		if (!buffer_uptodate(bh)) {

sb_getblk() calls __getblk(), which is might_sleep() so is a no-no.

> @@ -119,6 +120,7 @@ read_inode_bitmap(struct super_block *sb
>  	} else {
>  		bh = sb_bread(sb, ext4_inode_bitmap(sb, desc));
>  	}
> +	spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));

Likewise "sb_bread" is doing disk access.  I guess you don't have
CONFIG_DEBUG_SPINLOCK_SLEEP enabled in your kernel.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

--
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