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]
Date:	Sat, 31 Mar 2007 13:57:29 +0100
From:	David Howells <dhowells@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Hugh Dickins <hugh@...itas.com>,
	Brian Pomerantz <bapper@...atehaven.org>,
	viro@...iv.linux.org.uk, linux-kernel@...r.kernel.org,
	Nick Piggin <nickpiggin@...oo.com.au>
Subject: Re: [PATCH] fix page leak during core dump 

Andrew Morton <akpm@...ux-foundation.org> wrote:

> <would anyone be interested in hearing my opinion on the DUMP_SEEK macro
> again?>

I can guess.  And it's very probably right.  Macros containing return
statements like that are dodgy as they help people screw up the error handling.

However, ...

Andrew Morton <akpm@...ux-foundation.org> wrote:

> -				DUMP_SEEK(file->f_pos + PAGE_SIZE);
> -				page_cache_release(page);
> +				if (!dump_seek(file, file->f_pos + PAGE_SIZE)) {
> +					page_cache_release(page);
> +					return 0;
> +				}

Is not correct as you've then eliminated the page_cache_release() on the
success path.  What you probably intended was:

	int tmp;
	...
				tmp = dump_seek(file, file->f_pos + PAGE_SIZE);
				page_cache_release(page);
				if (!tmp)
					return 0;

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ