From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 D315F168DE; Wed, 3 Apr 2024 02:10:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712110232; cv=none; b=uDzzqsoIXSKRyvCnx9uAKCsDgHNc++WBMoU3kQBzELeU848uPFqnscA9jLWEw0/xSHsPjZGj4zsmOrIUcN94KZGuK/O/Y4HP0JXkxxgWFXeFNVWD8u4gEd/9EkTmG7bhJ3tiamtjiwdhvGiXiiTc9f2MC7CpjXJO+G1OF+cBnlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712110232; c=relaxed/simple; bh=y6DvVEooFfS6fE42WhsK/UU1M9fwwEQd4IEC65RgZdk=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=LI2X7P7hnQMYmZaLe28OuoC+Q4cgsFGwOHBDHXkmeKrYYQwTtX5F2o8ez19/0R0JojALfwvMBZzvu13B/imIgiJok6LBiUMmGfrdcj+lO+Wwg6qJcZhppQAhE5Gn/aRQUqNtAtoiPjia/LaaokoI8QgsPZikPXIdKLM57WLq/2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LCPbcesp; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LCPbcesp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D029C433C7; Wed, 3 Apr 2024 02:10:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712110231; bh=y6DvVEooFfS6fE42WhsK/UU1M9fwwEQd4IEC65RgZdk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LCPbcespmCZc8RnSHDEKXToJp4JYVa+JgyFU1TzjuPNUjbSGqIZkhC7AvH3irfGko u9ECvhb6Do9hyYqsSutp9jVnJHzsQ9xzcHRRIGSXg0e1TMG3uL5UD/rqvFDAPatRlj Luyg/ct38rckmpYUPG9EtTaVGaOu012+ZPTqKRAyaMko8Auradq9bGeAIeSrW37jBh V8eZsAOidVQbgbMOUpsN64u4CDZz+3VOMHG66tj+oyHQOr99LHkXZshyCmot2ie9xk G+em7l80Rl/WPk4duNzgrjwQTuQdfrH8gL35lcrASI2OrO4ZogrEy+KYWNISf6JKnf D+fIX6/wF0s0Q== Date: Tue, 2 Apr 2024 19:10:29 -0700 From: Jakub Kicinski To: Mina Almasry Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, Ayush Sawal , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mirko Lindner , Stephen Hemminger , Tariq Toukan , Steffen Klassert , Herbert Xu , David Ahern , Boris Pismenny , John Fastabend , Dragos Tatulea , Maxim Mikityanskiy , Sabrina Dubroca , Simon Horman , Yunsheng Lin , "Ahelenia =?UTF-8?B?WmllbWlhxYRza2E=?=" , Christophe JAILLET , David Howells , Florian Westphal , Aleksander Lobakin , Lorenzo Bianconi , Johannes Berg , Liang Chen Subject: Re: [PATCH net-next v3 0/3] Minor cleanups to skb frag ref/unref Message-ID: <20240402191029.321b1609@kernel.org> In-Reply-To: <20240401215042.1877541-1-almasrymina@google.com> References: <20240401215042.1877541-1-almasrymina@google.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 1 Apr 2024 14:50:36 -0700 Mina Almasry wrote: > This series is largely motivated by a recent discussion where there was > some confusion on how to properly ref/unref pp pages vs non pp pages: > > https://lore.kernel.org/netdev/CAHS8izOoO-EovwMwAm9tLYetwikNPxC0FKyVGu1TPJWSz4bGoA@mail.gmail.com/T/#t > > There is some subtely there because pp uses page->pp_ref_count for > refcounting, while non-pp uses get_page()/put_page() for ref counting. > Getting the refcounting pairs wrong can lead to kernel crash. > > Additionally currently it may not be obvious to skb users unaware of > page pool internals how to properly acquire a ref on a pp frag. It > requires checking of skb->pp_recycle & is_pp_page() to make the correct > calls and may require some handling at the call site aware of arguable pp > internals. I concluded that Olek's series as good to go in, so you gotta rebase. -- pw-bot: cr