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>] [day] [month] [year] [list]
Date:	Thu, 02 Apr 2009 15:21:07 +0100
From:	David Howells <dhowells@...hat.com>
To:	Nick Piggin <nickpiggin@...oo.com.au>
Cc:	dhowells@...hat.com, viro@...iv.linux.org.uk, nfsv4@...ux-nfs.org,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 05/43] FS-Cache: Release page->private after failed readahead [ver #46]

Nick Piggin <nickpiggin@...oo.com.au> wrote:

> This does not release the page for which the filler function fails.

That's a good point.  That page is attached to the pagecache and the LRU by
that point.  I suppose the page could be removed (but someone else may be
trying to reference it by this point), or I could amend the patch text to:

	The attached patch causes read_cache_pages() to release page-private
	data on a page for which add_to_page_cache() fails.  If the filler
	function fails, then the problematic page is left attached to the
	pagecache (with appropriate flags set, one presumes) and the remaining
	to-be-attached pages are invalidated and discarded.  This permits
	pages with caching references associated with them to be cleaned up.

	The invalidatepage() address space op is called (indirectly) to do the
	honours.

How about that?

> I don't have a problem with this if it is significantly easier to do here
> than the caller -- it should be a slowpath.

It could be done in the caller - every caller of read_cache_pages() that might
have the pages pre-annotated.  But the changes are all in the error handling
path.  If read_cache_pages() doesn't see an error, these changes are not
activated.

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