]> git.baikalelectronics.ru Git - kernel.git/commit
ubd: fix missing lock around request issue
authorJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 21:34:05 +0000 (14:34 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 7 Nov 2018 21:34:05 +0000 (14:34 -0700)
commit53c0977cfe41b318464105d89f24cd7dcd61ffec
tree4c7e07de3f4fc24b0e494e457232a996afb68435
parentebc5f0d588f06d85c8e3290615b97d301bff3b4e
ubd: fix missing lock around request issue

We need to hold the device lock (and disable interrupts) while
writing new commands, or we could be interrupted while that
is happening and read invalid requests in the completion path.

Fixes: d3041a4cf80a ("um: Convert ubd driver to blk-mq")
Tested-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
arch/um/drivers/ubd_kern.c