[PATCH] nvme-loop: set blocking flag

Bart Van Assche bvanassche at acm.org
Thu Oct 17 10:36:04 PDT 2024


On 10/17/24 10:20 AM, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> Commit 505363957fad ("nvmet: fix nvme status code when namespace is
> disabled") introduced a mutex lock in the io path for target. The loop
> target connects this to the blk-mq submission side, so it requires the
> blocking flag set so that queue_rq doesn't happen inside an rcu context.
> 
> Reported-by: Shinichiro Kawasaki <shinichiro.kawasaki at wdc.com>
> Signed-off-by: Keith Busch <kbusch at kernel.org>
> ---
>   drivers/nvme/target/loop.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/target/loop.c b/drivers/nvme/target/loop.c
> index e32790d8fc260..77dd809fe4507 100644
> --- a/drivers/nvme/target/loop.c
> +++ b/drivers/nvme/target/loop.c
> @@ -479,7 +479,7 @@ static void nvme_loop_reset_ctrl_work(struct work_struct *work)
>   static const struct nvme_ctrl_ops nvme_loop_ctrl_ops = {
>   	.name			= "loop",
>   	.module			= THIS_MODULE,
> -	.flags			= NVME_F_FABRICS,
> +	.flags			= NVME_F_FABRICS | NVME_F_BLOCKING,
>   	.reg_read32		= nvmf_reg_read32,
>   	.reg_read64		= nvmf_reg_read64,
>   	.reg_write32		= nvmf_reg_write32,

Shouldn't this patch have Fixes: and Cc: stable tags?

Thanks,

Bart.



More information about the Linux-nvme mailing list