[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191104212148.975125444@linuxfoundation.org>
Date: Mon, 4 Nov 2019 22:45:11 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Anton Ivanov <anton.ivanov@...bridgegreys.com>,
Jens Axboe <axboe@...nel.dk>
Subject: [PATCH 5.3 121/163] um-ubd: Entrust re-queue to the upper layers
From: Anton Ivanov <anton.ivanov@...bridgegreys.com>
commit d848074b2f1eb11a38691285f7366bce83087014 upstream.
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@...r.kernel.org # v5.0+
Signed-off-by: Anton Ivanov <anton.ivanov@...bridgegreys.com>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/um/drivers/ubd_kern.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- 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
spin_unlock_irq(&ubd_dev->lock);
- if (ret < 0)
- blk_mq_requeue_request(req, true);
+ if (ret < 0) {
+ if (ret == -ENOMEM)
+ res = BLK_STS_RESOURCE;
+ else
+ res = BLK_STS_DEV_RESOURCE;
+ }
return res;
}
Powered by blists - more mailing lists