From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E231B3ACEE3 for ; Mon, 10 Aug 2026 23:40:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786405225; cv=none; b=UTz3qP7ne65kFqDSPuz1i5757xDB/5cr8GTTszrJbY+bsD1zF7cghqdMWnjvAu113KY/UZSQnFduof84F3wBPpkd4mlBYismawUAdsoZm7tgcVHlw1rOuEDxBEeErW3270LdCW6VxW3811+wn049Dydf7aGHZ9cSmaQ7wNBh2u8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786405225; c=relaxed/simple; bh=YsOXkQMZOnzNFoiQW8QEIPlVEzMBBkmX0IxKuiqHGA4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=WYHMVj9EsOdHD8aK5nqWT/SMXquEy5ur3ByDv/Of9p1bBeO7cEiiIrKQnvvYV3C6/oKwbSUEQtLaOcpJpfb4VRC3OuwtWKkl0tZPrv50rQiErsHz9zKTKizK8dYOLULNj8vwgnLEsNSgDygCEUGX2fiQCd+VFGuTaCB3Ic7yM/c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DB6c3Wp3; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DB6c3Wp3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8A711F000E9; Mon, 10 Aug 2026 23:40:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786405223; bh=YWqTwBnJcyyHxygQYXwmOQn9vbdfi+K5tJjxD/t8eiU=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=DB6c3Wp32ELm8yxhz/eaUk3lfa3kE8R0VHKNN7qioenAZIgzLrKUkYJgW2fbIZoyo oWoU1KZOoknsJo058WAL8Dhh/pfmBruYFBq9c5pQRF0lP3UvFUteXMRqtMRQ5eCiWb tZhO9kq/zNskaS2tJGcob7vWNSayFQzavga/32D7BUgGR6NEYWSWKKo2LKdAQy91zK QuBxwcCuIZ6VKQjMdEv4taRc6nFa1rM7C6akiXQFJkCZnFiG9pt7RrLfXZa9IzINWN Csn3JtF+XvIvQl0J6LUAadB2pN7sq1zyYr7U6wwFK7LEknFsBqe3x9Lj7CZPNq07pi BljMqQx4/b9AA== Date: Mon, 10 Aug 2026 17:40:21 -0600 From: Keith Busch To: Daniel Wagner Cc: Christoph Hellwig , Sagi Grimberg , Chris Leech , linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Dmitry Bogdanov , Daniel Wagner Subject: Re: [PATCH] nvme-tcp: fix usage of page_frag_cache Message-ID: References: <20260716-nvme-tcp-page_fraq_cache-v1-1-ea660828cf93@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260716-nvme-tcp-page_fraq_cache-v1-1-ea660828cf93@kernel.org> On Thu, Jul 16, 2026 at 04:42:19PM +0200, Daniel Wagner wrote: > From: Dmitry Bogdanov > > 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.