Re: [PATCH RFC 3/5] block: validate bio bounds in the queue entered context
Chris S <[email protected]>
| Newsgroups | org.kernel.vger.linux-block,org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <CACd_6n0dCda28CA+1WePuHjXEqu+wB_sFvWWPQmrmO3nfW7WiQ@mail.gmail.com> |
Got you. Please let me know if you need any help. Best, Chao On Mon, Aug 10, 2026 at 5:23 PM Keith Busch <[email protected]> wrote: > > On Mon, Aug 10, 2026 at 05:12:45PM -0400, Chris S wrote: > > Keith, I checked this patch against the nvme_setup_rw() WARN I reported > > (the second link in your cover letter). __bio_split_to_limits() is > > called from blk_mq_submit_bio() after bio_queue_enter(), on both the > > cached-request path and the newly-allocated-request path, so the bounds > > check is now serialized against the freeze window in > > nvme_update_ns_info_block(). With the capacity forced to 0, the bio is > > failed here and can no longer reach nvme_queue_rq(), which is exactly > > the race I hit. Thanks for picking it up, and sorry for the slow reply. > > > > I'll drop my own "nvme: don't WARN on I/O to a namespace revalidated to > > unusable metadata" patch in favour of this. > > I'll need to revisit this approach as it is dependent on something in > the stack calling the split to limits functions, as well as the upper > layers error handling for a catching the end-of-device condition later > than before.