This is a note to let you know that I've just added the patch titled
dm ioctl: set noio flag to avoid __vmalloc deadlock
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-ioctl-set-noio-flag-to-avoid-__vmalloc-deadlock.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 1c0e883e86ece31880fac2f84b260545d66a39e0 Mon Sep 17 00:00:00 2001
From: Mikulas Patocka <[email protected]>
Date: Wed, 10 Jul 2013 23:41:15 +0100
Subject: dm ioctl: set noio flag to avoid __vmalloc deadlock
From: Mikulas Patocka <[email protected]>
commit 1c0e883e86ece31880fac2f84b260545d66a39e0 upstream.
Set noio flag while calling __vmalloc() because it doesn't fully respect
gfp flags to avoid a possible deadlock (see commit
502624bdad3dba45dfaacaf36b7d83e39e74b2d2).
This should be backported to stable kernels 3.8 and newer. The kernel 3.8
doesn't have memalloc_noio_save(), so we should set and restore process
flag PF_MEMALLOC instead.
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: Alasdair G Kergon <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/dm-ioctl.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -1644,7 +1644,10 @@ static int copy_params(struct dm_ioctl _
}
if (!dmi) {
+ unsigned noio_flag;
+ noio_flag = memalloc_noio_save();
dmi = __vmalloc(param_kernel->data_size, GFP_NOIO |
__GFP_REPEAT | __GFP_HIGH, PAGE_KERNEL);
+ memalloc_noio_restore(noio_flag);
if (dmi)
*param_flags |= DM_PARAMS_VMALLOC;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/dm-verity-fix-inability-to-use-a-few-specific-devices-sizes.patch
queue-3.10/dm-ioctl-set-noio-flag-to-avoid-__vmalloc-deadlock.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html