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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080126170331.GB13231@mit.edu>
Date:	Sat, 26 Jan 2008 12:03:31 -0500
From:	Theodore Tso <tytso@....edu>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Cc:	Theodore Y Tso <theotso@...ibm.com>, Mingming Cao <cmm@...ibm.com>,
	"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: Patch for 2.6.25 queue

On Sat, Jan 26, 2008 at 05:08:49PM +0530, Aneesh Kumar K.V wrote:
> This diff contain mballoc fixes and update for ext3-4 migrate patch.

I will fold these patches into the patch queue in the proper places
(and adjust other patches as necessary).

> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
> index a60672c..9de0cdf 100644
> --- a/fs/ext4/mballoc.c
> +++ b/fs/ext4/mballoc.c
> @@ -4452,7 +4452,6 @@ do_more:
>  		overflow = bit + count - EXT4_BLOCKS_PER_GROUP(sb);
>  		count -= overflow;
>  	}
> -	put_bh(bitmap_bh);
>  	bitmap_bh = read_block_bitmap(sb, block_group);
>  	if (!bitmap_bh)
>  		goto error_return;

This patch hunk causes a failure due to a botched brelse->put_bh
conversion, but removing it isn't the right fix.  It was there to
avoid a buffer leak on a goto.  So the right fix is to remove the
put_bh() above, but to add one here, circa line 4542 of mballoc.c:

	if (overflow && !err) {
		block += count;
		count = overflow;
+		put_bh(bitmap_bh);
		goto do_more;
	}

And once we do that, we can drop the initialization of bitmap_bh to
NULL, circa line 4408:

			int metadata, unsigned long *freed)
{
-	struct buffer_head *bitmap_bh = NULL;
+	struct buffer_head *bitmap_bh;
	struct super_block *sb = inode->i_sb;
	struct ext4_allocation_context ac;


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