This is a note to let you know that I've just added the patch titled ublk_drv: return flag of UBLK_F_URING_CMD_COMP_IN_TASK in case of module to the 6.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ublk_drv-return-flag-of-ublk_f_uring_cmd_comp_in_tas.patch and it can be found in the queue-6.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0826aad61155281d24f6d7410411bf0ecede950f Author: Ming Lei <ming.lei@xxxxxxxxxx> Date: Sat Oct 29 09:04:29 2022 +0800 ublk_drv: return flag of UBLK_F_URING_CMD_COMP_IN_TASK in case of module [ Upstream commit 224e858f215a3d6304f95a92357a1753475ca9cf ] UBLK_F_URING_CMD_COMP_IN_TASK needs to be set and returned to userspace if ublk driver is built as module, otherwise userspace may get wrong flags shown. Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver") Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Reviewed-by: ZiyangZhang <ZiyangZhang@xxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20221029010432.598367-2-ming.lei@xxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/block/ublk_drv.c b/drivers/block/ublk_drv.c index 6a4a94b4cdf4..31a8715d3a4d 100644 --- a/drivers/block/ublk_drv.c +++ b/drivers/block/ublk_drv.c @@ -1507,6 +1507,9 @@ static int ublk_ctrl_add_dev(struct io_uring_cmd *cmd) */ ub->dev_info.flags &= UBLK_F_ALL; + if (!IS_BUILTIN(CONFIG_BLK_DEV_UBLK)) + ub->dev_info.flags |= UBLK_F_URING_CMD_COMP_IN_TASK; + /* We are not ready to support zero copy */ ub->dev_info.flags &= ~UBLK_F_SUPPORT_ZERO_COPY;