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:	Mon, 28 Jan 2008 09:48:28 +0800
From:	Shaohua Li <shaohua.li@...el.com>
To:	Nick Piggin <nickpiggin@...oo.com.au>
Cc:	Andrew Morton <akpm@...ux-foundation.org>, clameter@....com,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC] some page can't be migrated


On Mon, 2008-01-28 at 12:43 +1100, Nick Piggin wrote:
> On Sunday 27 January 2008 17:03, Andrew Morton wrote:
> > > On Fri, 25 Jan 2008 14:03:25 +0800 Shaohua Li <shaohua.li@...el.com>
> > > wrote:
> > >
> > > -	if (!page->mapping)
> > > +	if (!page->mapping) {
> > > +		if (!PageAnon(page) && PagePrivate(page))
> > > +			try_to_release_page(page, GFP_KERNEL);
> > >  		goto rcu_unlock;
> > > +	}
> >
> > We call something(GFP_KERNEL) under rcu_read_lock()?  I've lost track of
> > the myriad flavours of rcu which we purport to support, but I don't think
> > they'll all like us blocking under rcu_read_lock().
> >
> > We _won't_ block, because try_to_release_page() will see the NULL ->mapping
> > and will call the non-blocking try_to_free_buffers().  But still, it looks
> > bad, and will cause problems if someone decides to add a might_sleep_if()
> > to try_to_release_page().
> >
> > So...  I'd suggest that it would be better to add an apologetic comment and
> > call direct into try_to_free_buffers().
> 
> You're right, but can't we just rcu_read_unlock() before try_to_release_page?
or we could move the code above before doing rcu_read_lock()?

--
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