From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fhigh-b4-smtp.messagingengine.com (fhigh-b4-smtp.messagingengine.com [202.12.124.155]) (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 53DBF22155E for ; Thu, 13 Feb 2025 12:27:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.155 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739449674; cv=none; b=G3A2MvD8+7NTBFt2mWh1jn+HbFrel7pa/8dUQcLXGT1S/chOuwkctswSFv8AqPjg/4nZkwZAJPvfP3xw/M8gGj2Q0uwlIIRtcmcAFh5gr7o6N7mWJ3PSdnTYLYYdEMpJfZue2PCb8bdVZ24v7XQRgEPHjocODHUW40OHM8+sUmA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739449674; c=relaxed/simple; bh=ZzQf/gICF0NaInz07XO7R2BcQiL2ViPc7R3cpXi5eLU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GinHdGFbt14vPEjWdmhXzjybBmgtBMLKYfjBiputevlb0GKGdRK8c7PE1Hd9PZGU+jOuCjB7WqX8FVQD5TqhW9/+lfXgp4kUmC6CNKnnvDb3L8AyvAZbe1hK8xaFQI6poxOShOYrUPsIuafneZyET3PNNhxFKD9fcJSrCnBphRQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org; spf=none smtp.mailfrom=idosch.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pe67htdL; arc=none smtp.client-ip=202.12.124.155 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=idosch.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pe67htdL" Received: from phl-compute-13.internal (phl-compute-13.phl.internal [10.202.2.53]) by mailfhigh.stl.internal (Postfix) with ESMTP id 0D2C625401CE; Thu, 13 Feb 2025 07:27:51 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-13.internal (MEProxy); Thu, 13 Feb 2025 07:27:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1739449670; x=1739536070; bh=u1OBWQzn7G7a9JfKJgKyzjsmeOfUWBuEnGp m5jnkdjk=; b=pe67htdLY02uf2r0Xlr2BwOMry0dcP/YEdef6vnlccVKPkj61GW kmDD75EjKtkvWYKglyLCWiN04jiOT2UeUil+pkQZtHngj1T/PY3lA/pVEdobokvI fCaym8TeJDxj8zm973mgGUqv5RP6VFBwL3t9rAtJgpcCF5SRTWiYI44YYegmVNuB iM1fCun8IxmGmctiABikWwGE1G2fAnDUVVH/Dn5Im++jnkdXt4A3x067GSCl3+Iv pg8uKYDrmTPmDHWHbNjWR6fNCTjYAMDaLw+tedh8fjIzBqR+4/nABo9pkSadw1Um +E/2UZ9/L4clEyclxjc34rfac1T/oLkPGhw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdegieejjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehttdertddttddv necuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrd horhhgqeenucggtffrrghtthgvrhhnpedvudefveekheeugeeftddvveefgfduieefudei fefgleekheegleegjeejgeeghfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhgpdhnsggprhgtphht thhopedutddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepjhhushhtihhnrdhiuh hrmhgrnhesuhhlihgvghgvrdgsvgdprhgtphhtthhopehnvghtuggvvhesvhhgvghrrdhk vghrnhgvlhdrohhrghdprhgtphhtthhopegurghvvghmsegurghvvghmlhhofhhtrdhnvg htpdhrtghpthhtohepughsrghhvghrnheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohep vgguuhhmrgiivghtsehgohhoghhlvgdrtghomhdprhgtphhtthhopehkuhgsrgeskhgvrh hnvghlrdhorhhgpdhrtghpthhtohepphgrsggvnhhisehrvgguhhgrthdrtghomhdprhgt phhtthhopehhohhrmhhssehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrlhgvgidrrg hrihhnghesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i494840e7:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Feb 2025 07:27:49 -0500 (EST) Date: Thu, 13 Feb 2025 14:27:46 +0200 From: Ido Schimmel To: Justin Iurman Cc: netdev@vger.kernel.org, davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, Alexander Aring , David Lebrun Subject: Re: [PATCH net v2 1/3] net: ipv6: fix dst ref loops on input in rpl and seg6 lwtunnels Message-ID: References: <20250211221624.18435-1-justin.iurman@uliege.be> <20250211221624.18435-2-justin.iurman@uliege.be> Precedence: bulk X-Mailing-List: netdev@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: <20250211221624.18435-2-justin.iurman@uliege.be> On Tue, Feb 11, 2025 at 11:16:22PM +0100, Justin Iurman wrote: > As a follow up to commit 92191dd10730 ("net: ipv6: fix dst ref loops in > rpl, seg6 and ioam6 lwtunnels"), we also need a conditional dst cache on > input for seg6_iptunnel and rpl_iptunnel to prevent dst ref loops (i.e., > if the packet destination did not change, we may end up recording a > reference to the lwtunnel in its own cache, and the lwtunnel state will > never be freed). > > Fixes: a7a29f9c361f ("net: ipv6: add rpl sr tunnel") > Fixes: af4a2209b134 ("ipv6: sr: use dst_cache in seg6_input") > Signed-off-by: Justin Iurman > Cc: Alexander Aring > Cc: David Lebrun Not an expert but was asked to take a look. Seems consistent with the output path and comparing the state address seems safe as it is only compared and never dereferenced after dropping the dst in the input path. I would have probably split it into two patches to make it a bit easier to backport. 5.4.y needs the seg6 fix, but not the rpl one. Reviewed-by: Ido Schimmel