From: Jens Axboe <axboe@kernel.dk>
To: Chengming Zhou <zhouchengming@bytedance.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] blk-mq: move bio merge attempt to blk_mq_submit_bio()
Date: Fri, 12 Aug 2022 06:40:32 -0600 [thread overview]
Message-ID: <330468da-a778-6cfc-ce46-a62566d71c8d@kernel.dk> (raw)
In-Reply-To: <20220812083944.79616-1-zhouchengming@bytedance.com>
On 8/12/22 2:39 AM, Chengming Zhou wrote:
> We will try to get request from cache before alloc request, in
> both cases will first attempt bio merge.
>
> This patch move this common part to blk_mq_submit_bio(), which
> simplify the code and avoid passing in the pointer of bio.
I don't think this will work. If we get a cached request, then we
know we have a reference to the queue. If you swap these around,
then that's no longer the case and we can have a use-after-free if
the queue goes away.
--
Jens Axboe
next prev parent reply other threads:[~2022-08-12 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-12 8:39 [PATCH] blk-mq: move bio merge attempt to blk_mq_submit_bio() Chengming Zhou
2022-08-12 12:40 ` Jens Axboe [this message]
2022-08-12 14:48 ` Chengming Zhou
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=330468da-a778-6cfc-ce46-a62566d71c8d@kernel.dk \
--to=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhouchengming@bytedance.com \
/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