drbd: fix potential deadlock during bitmap (re-)allocation
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 20 Sep 2012 12:05:39 +0000 (14:05 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Oct 2012 07:39:18 +0000 (08:39 +0100)
commit0b143d4382b62db6738196caaefa793e5c0f6690
tree0163ab96980949c3bc6e578540e3fa7e95969b74
parent7fb907c15fb8d0e10e72c8566a13f6defab3f484
drbd: fix potential deadlock during bitmap (re-)allocation

The former comment arguing that GFP_KERNEL was good enough was wrong: it
did not take resize into account at all, and assumed the only path
leading here was the normal attach on a still secondary device, so no
deadlock would be possible.

Both resize on a Primary, or attach on a diskless Primary,
could potentially deadlock.

drbd_bm_resize() is called while IO to the respective device is
suspended, so we must use GFP_NOIO to avoid potential deadlock.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_bitmap.c
This page took 0.024224 seconds and 5 git commands to generate.