提交 d848074b 编写于 作者: A Anton Ivanov 提交者: Jens Axboe

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: 53766def ("um: Clean-up command processing in UML UBD driver")
Cc: stable@vger.kernel.org # v5.0+
Signed-off-by: NAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 86cccfbf
...@@ -1403,8 +1403,12 @@ static blk_status_t ubd_queue_rq(struct blk_mq_hw_ctx *hctx, ...@@ -1403,8 +1403,12 @@ static blk_status_t ubd_queue_rq(struct blk_mq_hw_ctx *hctx,
spin_unlock_irq(&ubd_dev->lock); spin_unlock_irq(&ubd_dev->lock);
if (ret < 0) if (ret < 0) {
blk_mq_requeue_request(req, true); if (ret == -ENOMEM)
res = BLK_STS_RESOURCE;
else
res = BLK_STS_DEV_RESOURCE;
}
return res; return res;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部