]> git.baikalelectronics.ru Git - kernel.git/commit
dm ioctl: set noio flag to avoid __vmalloc deadlock
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Jul 2013 22:41:15 +0000 (23:41 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Wed, 10 Jul 2013 22:41:15 +0000 (23:41 +0100)
commitd87a3a55110693e6d7476a785d9f392deab2d86a
treeb56dd76ef7c1c0598af5b830e2a3d8f8a38f772b
parent3ff4f9ec50d2dccecc0a0dee0759cb7ae5837039
dm ioctl: set noio flag to avoid __vmalloc deadlock

Set noio flag while calling __vmalloc() because it doesn't fully respect
gfp flags to avoid a possible deadlock (see commit
009a85463965489ff110274a8ae4405522c0d14d).

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 <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-ioctl.c