From: Hannes Reinecke <hare@suse.de>
To: Keith Busch <kbusch@meta.com>,
axboe@kernel.dk, linux-block@vger.kernel.org
Cc: Keith Busch <kbusch@kernel.org>,
stable@vger.kernel.org, Henry Hu <huhai@kylinos.cn>
Subject: Re: [PATCH] blk-mq: set RQF_USE_SCHED when the operation is known
Date: Tue, 22 Sep 2026 07:48:52 +0200 [thread overview]
Message-ID: <d415d07b-023c-4dcb-92f3-2eb2f7159341@suse.de> (raw)
In-Reply-To: <20260921212624.1942234-1-kbusch@meta.com>
On 9/21/26 11:26 PM, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> The cached requests are allocated for one operation but can be handed
> out for another. A passthrough command has RQF_USE_SCHED cleared, so
> using those flags for a subsequent read/write bio will insert it into
> the scheduler without ->prepare_request() and frees it without
> ->finish_request(). For kyber, this leaks the domain token acquired at
> dispatch and stalls the queue.
>
> Don't set RQF_USE_SCHED based on the first operation the batch happened
> to be allocated for. Instead, set it after the request is claimed by an
> operation.
>
> Fixes: 4b6a5d9cea91 ("block: enable batched allocation for blk_mq_alloc_request()")
> Cc: stable@vger.kernel.org
> Reported-by: Henry Hu <huhai@kylinos.cn>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
> block/blk-mq.c | 51 +++++++++++++++++++++++++++++---------------------
> 1 file changed, 30 insertions(+), 21 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
next prev parent reply other threads:[~2026-09-22 5:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 21:26 [PATCH] blk-mq: set RQF_USE_SCHED when the operation is known Keith Busch
2026-09-22 5:48 ` Hannes Reinecke [this message]
2026-09-22 12:48 ` Christoph Hellwig
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=d415d07b-023c-4dcb-92f3-2eb2f7159341@suse.de \
--to=hare@suse.de \
--cc=axboe@kernel.dk \
--cc=huhai@kylinos.cn \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-block@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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