]> git.baikalelectronics.ru Git - kernel.git/commit
nbd: don't start req until after the dead connection logic
authorJosef Bacik <jbacik@fb.com>
Mon, 6 Nov 2017 21:11:58 +0000 (16:11 -0500)
committerJens Axboe <axboe@kernel.dk>
Mon, 6 Nov 2017 21:15:04 +0000 (14:15 -0700)
commit65b9b7356e5c5d95aa46ec700f7394d2fc49b25f
treeb3e4a8ef7e6a4a50f542afc8a3c9f2ab255032eb
parent3247654eb56ca2096d5e4c3e17ceb49d0210fa43
nbd: don't start req until after the dead connection logic

We can end up sleeping for a while waiting for the dead timeout, which
means we could get the per request timer to fire.  We did handle this
case, but if the dead timeout happened right after we submitted we'd
either tear down the connection or possibly requeue as we're handling an
error and race with the endio which can lead to panics and other
hilarity.

Fixes: e8a6aba2ff9c ("nbd: handle dead connections")
Cc: stable@vger.kernel.org
Signed-off-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/nbd.c