+ cpuset-might_sleep_if-check-in-cpuset_zones_allowed.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     cpuset: might_sleep_if check in cpuset_zones_allowed

has been added to the -mm tree.  Its filename is

     cpuset-might_sleep_if-check-in-cpuset_zones_allowed.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: cpuset: might_sleep_if check in cpuset_zones_allowed
From: Paul Jackson <pj@xxxxxxx>


It's too easy to incorrectly call cpuset_zone_allowed() in an atomic
context without __GFP_HARDWALL set, and when done, it is not noticed until
a tight memory situation forces allocations to be tried outside the current
cpuset.

Add a 'might_sleep_if()' check, to catch this earlier on, instead of
waiting for a similar check in the mutex_lock() code, which is only rarely
invoked.

Signed-off-by: Paul Jackson <pj@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 kernel/cpuset.c |    1 +
 1 files changed, 1 insertion(+)

diff -puN kernel/cpuset.c~cpuset-might_sleep_if-check-in-cpuset_zones_allowed kernel/cpuset.c
--- devel/kernel/cpuset.c~cpuset-might_sleep_if-check-in-cpuset_zones_allowed	2006-05-18 02:09:26.000000000 -0700
+++ devel-akpm/kernel/cpuset.c	2006-05-18 02:09:26.000000000 -0700
@@ -2261,6 +2261,7 @@ int __cpuset_zone_allowed(struct zone *z
 	if (in_interrupt())
 		return 1;
 	node = z->zone_pgdat->node_id;
+	might_sleep_if(!(gfp_mask & __GFP_HARDWALL));
 	if (node_isset(node, current->mems_allowed))
 		return 1;
 	if (gfp_mask & __GFP_HARDWALL)	/* If hardwall request, stop here */
_

Patches currently in -mm which might be from pj@xxxxxxx are

cpuset-might-sleep-checking-zones-allowed-fix.patch
cpuset-update-cpuset_zones_allowed-comment.patch
cpuset-might_sleep_if-check-in-cpuset_zones_allowed.patch
proc-dont-lock-task_structs-indefinitely.patch
proc-dont-lock-task_structs-indefinitely-task_mmu-small-fixes.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux