]> xenbits.xensource.com Git - xenclient/kernel.git/commitdiff
Avoid another allocation on the resume path which can lead to deadlock
authorIan Campbell <ian.campbell@citrix.com>
Fri, 28 Mar 2008 09:44:51 +0000 (09:44 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 28 Mar 2008 09:44:51 +0000 (09:44 +0000)
if the swap device isn't present yet.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
drivers/xen/blkfront/blkfront.c

index 6410939e757f8fed63785ad43c7d7bd0e515ad5a..bee173a7003986fb7147850049686b33c1b27e12 100644 (file)
@@ -817,7 +817,7 @@ static void blkif_recover(struct blkfront_info *info)
        int j;
 
        /* Stage 1: Make a safe copy of the shadow state. */
-       copy = kmalloc(sizeof(info->shadow), GFP_KERNEL | __GFP_NOFAIL);
+       copy = kmalloc(sizeof(info->shadow), GFP_KERNEL | __GFP_NOFAIL | __GFP_HIGH);
        memcpy(copy, info->shadow, sizeof(info->shadow));
 
        /* Stage 2: Set up free list. */