lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aUPAgtbWVql9SkoG@infradead.org>
Date: Thu, 18 Dec 2025 00:51:14 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Michael Liang <mliang@...estorage.com>
Cc: axboe@...nel.dk, linux-block@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] blk-mq: always clear rq->bio in blk_complete_request()

On Wed, Dec 17, 2025 at 10:18:53AM -0700, Michael Liang wrote:
> Commit ab3e1d3bbab9 ("block: allow end_io based requests in the
> completion batch handling") changed blk_complete_request() so that
> rq->bio and rq->__data_len are only cleared when ->end_io is NULL.
> 
> This conditional clearing is incorrect. The block layer guarantees that
> all bios attached to the request are fully completed and released before
> blk_complete_request() is called. Leaving rq->bio pointing to already
> completed bios results in stale pointers that may be reused immediately
> by a bioset allocator.

Passthrough commands keep an extra reference on the bio and need the
pointer to call blk_rq_unmap_user from the completion handler.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ