Re: [PATCH] nvme-tcp: fix usage of page_frag_cache
From: Keith Busch
Date: Mon Aug 10 2026 - 19:40:32 EST
On Thu, Jul 16, 2026 at 04:42:19PM +0200, Daniel Wagner wrote:
> From: Dmitry Bogdanov <d.bogdanov@xxxxxxxxx>
>
> nvme uses page_frag_cache to preallocate PDU for each preallocated request
> of block device. Block devices are created in parallel threads,
> consequently page_frag_cache is used in not thread-safe manner.
> That leads to incorrect refcounting of backstore pages and premature free.
I was struggling to see how the nvme_tcp callback was happening
concurrently for the same queue. It's because you're using an io
scheduler, right? I don't think this applies if you don't have one
enabled.
Anyway, with that understanding, looks like a safe patch. Applied to
nvme-7.3.