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] [day] [month] [year] [list]
Date:	Mon, 12 Dec 2011 15:12:15 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Hillf Danton <dhillf@...il.com>
Cc:	Hugh Dickins <hughd@...gle.com>,
	David Rientjes <rientjes@...gle.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	Andrea Arcangeli <aarcange@...hat.com>, linux-mm@...ck.org,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: vmscan: try to free orphaned page

On Mon, 12 Dec 2011 20:24:39 +0800
Hillf Danton <dhillf@...il.com> wrote:

> If the orphaned page has no buffer attached at the moment, we clean it up by
> hand, then it has the chance to progress the freeing trip.
> 
> Signed-off-by: Hillf Danton <dhillf@...il.com>
> ---
> 
> --- a/mm/vmscan.c	Sun Dec  4 13:10:08 2011
> +++ b/mm/vmscan.c	Mon Dec 12 20:12:44 2011
> @@ -487,12 +487,10 @@ static pageout_t pageout(struct page *pa
>  		 * Some data journaling orphaned pages can have
>  		 * page->mapping == NULL while being dirty with clean buffers.
>  		 */
> -		if (page_has_private(page)) {
> -			if (try_to_free_buffers(page)) {
> -				ClearPageDirty(page);
> -				printk("%s: orphaned page\n", __func__);
> -				return PAGE_CLEAN;
> -			}
> +		if (!page_has_private(page) || try_to_free_buffers(page)) {
> +			ClearPageDirty(page);
> +			printk(KERN_INFO "%s: orphaned page\n", __func__);
> +			return PAGE_CLEAN;
>  		}
>  		return PAGE_KEEP;
>  	}

So if we find a dirty pagecache page with nothing at ->private, you're
suggesting that we simply mark it clean and free it.

afacit it would be a bug for a page to be in that state.

What prompted this patch?  I assume you've not encountered pages in
this state in your testing because if you had, that printk wouldn't
still be in there!

A brief bit of googling indicates that nobody has seen the "pageout:
orphaned page" warning for five years.
--
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