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  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:	Tue, 4 Nov 2008 12:15:15 -0500
From:	Theodore Tso <>
To:	"Aneesh Kumar K.V" <>
Subject: Re: [RFC PATCH -v2 7/9] ext4: don't use the block freed but not
	yet committed during buddy initialization

On Mon, Nov 03, 2008 at 11:06:07PM +0530, Aneesh Kumar K.V wrote:
> +static void ext4_mb_generate_from_freelist(struct super_block *sb, void *bitmap,
> +					ext4_group_t group,
> +					struct ext4_free_data *entry)
> +{
> +	if (n->rb_left) {
> +		new_entry = rb_entry(n->rb_left, struct ext4_free_data, node);
> +		ext4_mb_generate_from_freelist(sb, bitmap, group, new_entry);
> +	}
> +	if (n->rb_right) {
> +		new_entry = rb_entry(n->rb_right, struct ext4_free_data, node);
> +		ext4_mb_generate_from_freelist(sb, bitmap, group, new_entry);
> +	}

ext4_mb_generate_from_freelist() is recursively calling itself, which
could easily blow the stack if there are a large number of items on
the free list (remember, this can include data blocks if

You should probably use rb_first and rb_next in a loop rather than a
recursive descent.  I also remain concerned that
ext4_mb_generate_from_freelist() is could burn a large amount of CPU
in some cases, and as I said on the conference call, if there is a way
to avoid it, that would be a Good Thing.

						- Ted
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists