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]
Date:	Fri, 06 Jun 2008 11:59:24 -0700
From:	Mingming Cao <>
To:	Theodore Tso <tytso@....EDU>
Subject: Re: [PATCH] ext4: mballoc avoid use root reserved blocks for non
	root allocation

On Thu, 2008-06-05 at 22:33 -0400, Theodore Tso wrote:
> On Sun, Jun 01, 2008 at 02:06:53PM -0700, Mingming Cao wrote:
> > ext4: mballoc avoid use root reserved blocks for non root allocation
> > 
> > From: Mingming Cao <>
> > 
> > mballoc allocation missed check for blocks reserved for root users. Add
> > ext4_has_free_blocks() check before allocation. Also modified
> > ext4_has_free_blocks() to support multiple block allocation request.
> This was discovered by a Gentoo user who tried compiling on a UP system.....
> > Index: linux-2.6.26-rc4/fs/ext4/balloc.c
> > ....
> > +	if (free_blocks - root_blocks < FBC_BATCH)
> > +		free_blocks =
> > +			percpu_counter_sum_positive(&sbi->s_freeblocks_counter);
> FBC_BATCH is only defined if CONFIG_SMP is defined.  I believe the
> simplest fix is surround the above if statement with an "#ifdef
> CONFIG_SMP", since on UP systems, the percpu counters are always
> exactly correct.

Works for me. One up system the counter is always accurate.

FBC_BATCH is just some value to trigger sum up from per cpu counters to
get the accurate value, we don't need to do this for single UP.

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