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, 24 Sep 2007 18:18:30 +0530
From:	Balbir Singh <balbir@...ux.vnet.ibm.com>
To:	Peter Zijlstra <peterz@...radead.org>
CC:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Rik van Riel <riel@...hat.com>
Subject: Re: [RFC][PATCH] mm: couple rcu and memory reclaim

Peter Zijlstra wrote:
>>> Only kswapd can do this, direct reclaim has deadlock potential.
>> Yes, but not in all cases, do you want to add any gfp_mask
>> based smartness for direct reclaim?
> 
> gfp_mask doesn't carry the needed information. It depends on whether
> the current context holds a rcu_read_lock().
> 

What I meant was that nobody would hold rcu_read_lock() and pass
gfp_mask of GFP_KERNEL in scan_control or to do_try_to_free_pages()

> so something like:
> 
>    rcu_read_lock()
>    foo = kmalloc(sizeof(foo))

At this point, you really can't use GFP_KERNEL, since rcu_read_lock()
disables pre-emption in the current kernel, ideally you should see
a might_sleep() BUG.

>       new_slab()
>         __alloc_pages()
>           try_to_free_pages()
>             synchronise_rcu() <-- deadlock
>    rcu_read_unlock()


-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
-
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