Message ID | 20191029091334.3095-1-anton.ivanov@cambridgegreys.com |
---|---|
State | Not Applicable |
Headers | show |
Series | [v2] um: Entrust re-queue to the upper layers | expand |
On 10/29/19 3:13 AM, Anton Ivanov wrote: > Fixes crashes due to ubd requeue logic conflicting with the block-mq > logic. Crash is reproducible in 5.0 - 5.3. > > Fixes: 53766defb8c860a47e2a965f5b4b05ed2848e2d0 > Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> I can pick this one up, I'll fix up the Fixes and stable stuff too.
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 33c1cd6a12ac..40ab9ad7aa96 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, 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; }
Fixes crashes due to ubd requeue logic conflicting with the block-mq logic. Crash is reproducible in 5.0 - 5.3. Fixes: 53766defb8c860a47e2a965f5b4b05ed2848e2d0 Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com> --- arch/um/drivers/ubd_kern.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)