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]
Message-Id: <1182200979.3711.6.camel@dyn9047017103.beaverton.ibm.com>
Date:	Mon, 18 Jun 2007 14:09:39 -0700
From:	Mingming Cao <cmm@...ibm.com>
To:	Dmitriy Monakhov <dmonakhov@...ru>
Cc:	Alex Tomas <alex@...sterfs.com>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4:fix invariant checking in
	ext4_rebalance_reservation

On Sat, 2007-06-16 at 12:02 +0400, Dmitriy Monakhov wrote:
> Variable "free" was declarated as __u64 so conidition (free < 0) always
> false, even if free was overflowed during substraction.

Agreed. 

Can you add your Signed-off to this patch? I can add mine after yours.

Thanks,
Mingming
> ---
>  fs/ext4/balloc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
> index 43ae8f8..a9655f1 100644
> --- a/fs/ext4/balloc.c
> +++ b/fs/ext4/balloc.c
> @@ -1909,8 +1909,8 @@ void ext4_rebalance_reservation(struct ext4_reservation_slot *rs, __u64 free)
>  			chunk = free;
>  		if (rs[i].rs_reserved || i == smp_processor_id()) {
>  			rs[i].rs_reserved = chunk;
> +			BUG_ON(free < chunk);
>  			free -= chunk;
> -			BUG_ON(free < 0);
>  		}
>  	}
>  	BUG_ON(free);

-
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