Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] nvme/ioctl: don't call blk_mq_free_request() in nvme_map_user_request()
Date: Thu, 27 Mar 2025 11:42:32 +0100	[thread overview]
Message-ID: <20250327104232.GB10068@lst.de> (raw)
In-Reply-To: <20250321205722.3947901-3-csander@purestorage.com>

On Fri, Mar 21, 2025 at 02:57:21PM -0600, Caleb Sander Mateos wrote:
>  	ret = nvme_execute_rq(req, false);
>  	if (result)
>  		*result = le64_to_cpu(nvme_req(req)->result.u64);
>  	if (bio)
>  		blk_rq_unmap_user(bio);
> -	blk_mq_free_request(req);
>  
>  	if (effects)
>  		nvme_passthru_end(ctrl, ns, effects, cmd, ret);
>  
> +out_free_req:
> +	blk_mq_free_request(req);

We'll want the request freed before nvme_passthru_end here to avoid
deadlocks with namespaces scanning.



  reply	other threads:[~2025-03-27 10:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-21 20:57 [PATCH v2 0/3] nvme_map_user_request() cleanup Caleb Sander Mateos
2025-03-21 20:57 ` [PATCH v2 1/3] nvme/ioctl: don't warn on vectorized uring_cmd with fixed buffer Caleb Sander Mateos
2025-03-27 10:36   ` Christoph Hellwig
2025-03-21 20:57 ` [PATCH v2 2/3] nvme/ioctl: don't call blk_mq_free_request() in nvme_map_user_request() Caleb Sander Mateos
2025-03-27 10:42   ` Christoph Hellwig [this message]
2025-03-28  2:48     ` Caleb Sander Mateos
2025-03-21 20:57 ` [PATCH v2 3/3] nvme/ioctl: move fixed buffer lookup to nvme_uring_cmd_io() Caleb Sander Mateos
2025-03-27 10:44   ` Christoph Hellwig
2025-03-28  2:47     ` Caleb Sander Mateos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250327104232.GB10068@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=kbusch@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox