From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796392961; b=ipNRgtP3ND9ML6bQppMmSclOSSRsT1S4+l083khPjYJ285KqjLUQnNvZ6Q9w4+1WjRZC /oWeyZfApaGDI9FSzC18qI1d8Q2yLifNsGZYTkOwqP/catIidZ1smdrekNe0xeNuaxH9d 2rgDnYqzd2EtoQavCoWynj4MB/bwxPjLn2eTOmUABQqUnIQitKMkoetpxX4O6yKznH/9X Swunauspri4jMk+dWsNt7lMSXktrkJHYgSKtMs5LSFGJmr2wcceVSxeaxavUHVkOfgiMW T+vC9hDillEeEbp5RdxulEr8L2YkbLA+Zof1ELdLnQ7xoS3VOR7NBSm9JyDI5vT4c1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796392961; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=x1Z0vCI6vWvnV2rQQ2M6tenE57iAHev1R24DlpDr0Sg=; b=WdD7VpVsPYDP+BHG9gxQQZsFC9Q/VuHATcSKd9GxVKmXk485ga1WZVh6sFn4qXdd2MJq 0jVanT3eGgznev85JOzwSPRAZBWJlTR6cApTDHKPjTs6Vw5HwxGDUuBH8Sk7NfDF0pIsG xReINKPNO+KX+9vX0pr0oB80dKGKLxdQPh7jguEDqQhQA7168AR4tBJNolaptbD1OU3Xf hUcf29nwlon2/XmCU97k76161TqWymzFK2uYwUgooq4iHmeHv+VTZp/fA+EdFQUVLrVoS 8SZ654ARTQ0Wo067zOysb2HqpArJJJOJXmucoEIb+RG7z2EI2u2//2eWb4iKP7pPfog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PtyYTqpi; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FB2D606A32D for ; Fri, 4 Dec 2026 14:02:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=PtyYTqpi Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E3291F000CE; Fri, 4 Dec 2026 14:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796392961; bh=x1Z0vCI6vWvnV2rQQ2M6tenE57iAHev1R24DlpDr0Sg=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PtyYTqpi9NNK/b2KZcC0p/iA/AvHkLU+SHXL5BwjCIJ5JJEjc/7Fueben8pRtd40/ fFkDO/5S9Goh7abN1gXbKFS39O4/3pA2Ojtdrp/en06l8yBBmvhrYzQEvYrDqVGQwR rZ3d8prUBIO3Bxp07/FoKOBHnR3szcVnqv8lNeSz1uEZcgp4dQ+5rz7cyIqoQ7B8qs pt3VtAzmc7MkEYHTXf6iOiySWuUAedrSSSWVMV8Z5dUI2jydHb+V2hW03zSeDpHKzB ptIL+mamC11DEyk7sAgKplZUnaRyJxG4B4Ft1+PQewU+q2p/fU+lCeDsOAufX6yJxg vJZMEt9bD/9tQ== Subject: Re: [PATCH net v4 2/5] net/sched: cls_u32: remove erroneous refcount_inc() From: netdev-bot+sashiko@kernel.org To: jedrzej.jagielski@intel.com Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com, kuba@kernel.org, jhs@mojatatu.com, jiri@resnulli.us, edumazet@google.com Date: Fri, 04 Dec 2026 14:02:40 +0000 Message-ID: <179639296014.3146.10241070479974790312@kernel.org> In-Reply-To: <20261203124056.547555-3-jedrzej.jagielski@intel.com> References: <20261203124056.547555-3-jedrzej.jagielski@intel.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Thank you for your contribution! Sashiko AI review found more severe issue(s) in other patches of this series. This mail is only an FYI, in case you want to address the nit picks below when you respin. Low priority / nit picks for your consideration: - [Low] The commit message describes the removed refcount_inc() as "a forward fix for currently dead code, which will be uncovered by the… -- net/sched: cls_u32: remove erroneous refcount_inc() This patch removes the refcount_inc() on the old linked tc_u_hnode in the u32_replace_hw_knode() error path of u32_change(). The decrement done by u32_set_parms() is already balanced by the increment in u32_init_knode(), so the extra refcount_inc() leaks the hash table. Closes: https://sashiko.dev/#/patchset/20260807100356.1083774-1-jedrzej.jagielski%40intel.com > This is a forward fix for currently dead code, which will be uncovered > by the upcoming patch "net/sched: cls_u32: feed u32_replace_hw_knode() > with correct set of flags". [Severity: Low] This patch has Cc: stable and Fixes: e8d3d78c19be. Is "currently dead code" true for every stable tree it is meant for? The branch only became unreachable with 695176bfe5de ("net_sched: refactor TC action init API") in v5.14. That commit renamed the TCA_U32_FLAGS local in u32_change() from flags to userflags. It then reused flags for the kernel TCA_ACT_FLAGS_* word but left the knode call unchanged: err = u32_replace_hw_knode(tp, new, flags, extack); Since then, skip_sw has been ignored on this call. Before v5.14, flags still holds the user's TCA_U32_FLAGS value. Take a pre-5.14 stable tree that picked up e8d3d78c19be. There, a skip_sw replace with TCA_U32_LINK that fails to offload would reach this error branch. Each such failure would raise the old linked tc_u_hnode refcnt by one and never drop it. A later u32_delete() of that table would then return -EBUSY, and the table would never be freed. I can't tell from here whether e8d3d78c19be was actually backported to pre-5.14 trees, so this part depends on that. The follow-up flags patch carries Fixes: 695176bfe5de and would not apply to those older trees. Could the commit message say that the path is live in pre-v5.14 trees that contain e8d3d78c19be? Otherwise this patch might be skipped there as only mattering together with the flags patch. The refcount change itself looks correct: - u32_init_knode() takes a reference on the old ht_down. - u32_set_parms() takes one on the new table and drops one on the old. - __u32_destroy_key(new) drops the one on the new table. -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203124056.547555-1-jedrzej.jagielski%40intel.com