Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d848074b authored by Anton Ivanov's avatar Anton Ivanov Committed by Jens Axboe
Browse files

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: default avatarAnton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 86cccfbf
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;
}