aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>2019-10-29 05:13:34 -0400
committerJens Axboe <axboe@kernel.dk>2019-10-29 12:07:41 -0400
commitd848074b2f1eb11a38691285f7366bce83087014 (patch)
treef5698e3502e9499b73c8efab6676535e77fbd3fd /arch/um/drivers
parent86cccfbf773fafb88898c5627aa3727b02bc4708 (diff)
um-ubd: Entrust re-queue to the upper layers
Fixes crashes due to ubd requeue logic conflicting with the block-mq logic. Crash is reproducible in 5.0 - 5.3. Fixes: 53766defb8c8 ("um: Clean-up command processing in UML UBD driver") Cc: stable@vger.kernel.org # v5.0+ Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/ubd_kern.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 612535cd9706..6627d7c30f37 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1403,8 +1403,12 @@ static blk_status_t ubd_queue_rq(struct blk_mq_hw_ctx *hctx,
1403 1403
1404 spin_unlock_irq(&ubd_dev->lock); 1404 spin_unlock_irq(&ubd_dev->lock);
1405 1405
1406 if (ret < 0) 1406 if (ret < 0) {
1407 blk_mq_requeue_request(req, true); 1407 if (ret == -ENOMEM)
1408 res = BLK_STS_RESOURCE;
1409 else
1410 res = BLK_STS_DEV_RESOURCE;
1411 }
1408 1412
1409 return res; 1413 return res;
1410} 1414}