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]
Date:	Wed, 11 Jun 2008 10:23:56 -0400
From:	Theodore Tso <>
To:	Shen Feng <>
Cc:, Mingming Cao <>,
	Andrew Morton <>
Subject: Re: [PATCH] ext4: Fix the loop condition in

On Wed, Jun 11, 2008 at 11:55:45AM +0800, Shen Feng wrote:
> Since md is freed before the do-while checks it,
> it's better to change it to while(1).

This actually isn't a bug, since there is no problem checking a
pointer that has been freed; its only *dereferencing* a pointer which
is bad.  That being said, md is never NULL at the end of the loop,
since in the middle of the loop is the only break condition:

	if (md == NULL)

So the patch saves a tiny amount of compiled code, but it isn't really
a fix in any way.

That being said, if we're going to make this sort of change, my
preference would be to use the more common C idiom:

	while (1) {

as opposed to

	do {
	} while (1);

The former makes it quite clear that any exit from the loop is not
going to be coming from loop construct itself, but from any embedded
break statements inside the loop construct


						- 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