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=1796380388; b=Afmu0nkWHrliY3II602M33v4t7aX3d2ky+HAuzVOj4zh9hlpxb3imoeP83rfEDrP3nxS HtGWir78ryVSfnXSuyivMZy+WwA4ZrLdeP6uek8ghMg10VhP5SqllH84T8adxqj9mpmW4 JuGzFyGZXjWJ+SlHNCVkP0APAss2jmfgcXwltuJCnkmJ7SgDb91ZVCsaFmIR0jqBi/p/g 155Rf3XT17pq+FEIILTJ/yRxFJuUwzI9nswuinMGLQrBM0/WsUYxy2EBxkjLoClmGG8Ge yeXoA1/R748f61hhXRxaIcaddW+radiBcVyQdTQ1T1GNo69gLFDSztDt6NUu7U+dSCg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380388; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=BDDnk5h6gclMnH4uxH4hxKodLpCYTDIwSD6wE8sFGhM=; b=LWfRP4Iokwh4+AwU+fOXU7fe5Dmo98B+5mPLBYzh6SUykh3//9YZBkw9HfQMPQSuLgW1 Fuq4ta5vdjta0rGAW6X8JUxorktReTnpRTCjMfNEkyJOBL9ZcIP2I5wYHehu4FKWD9A+a HVQpqpOlOfGqNudbz9twbDk1rvA+BzThWbuvXYuZJ3Tnoa25ApDhxdKsdmOyi4m+G1wNy fjh3gl/rN0D/TmYDmuv8Lq4XgvvqZYc4Y6FQbpNyTyrZIDZ0Xt/vRdOcoORZtzuuD45rY Cj3F3z6qf0QsVAb4EbXLvh0lQ81v3+Cb/rgevFCbtyQUjnWhcuXj4dB1h02cexydevA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=TXtprde8; 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 2CD08606A334; Fri, 4 Dec 2026 10:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=TXtprde8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 995F61F00897; Fri, 4 Dec 2026 10:33:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380388; bh=BDDnk5h6gclMnH4uxH4hxKodLpCYTDIwSD6wE8sFGhM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TXtprde8LrTjZsJt5iE6qHw+fuYNEJhBjN702Fdss+U/Id64tNUEQXL/PVJtgeGK4 3S+uXS7iKPhNot0qE8yXSL/TZnURd/Gfiy/+o2uA+eZEZoHzcBhiwhPUjjhJo6n9Z9 0bjCEBUeNTT9kcaxyfG1SsqtZgPtn84T8R9Qctmw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Fainelli , Willem de Bruijn , Sasha Levin Subject: [PATCH 7.3 250/742] net: dsa: b53: clear stale state when creating an ARL entry Date: Fri, 4 Dec 2026 19:01:54 +0900 Message-ID: <20261204100641.703205326@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Fainelli [ Upstream commit c6f0992ff6c2c138ffb1b64f406a66d42615770b ] When an ARL lookup does not find the requested MAC and VID, b53_arl_read() returns the first free bin index but leaves the entry populated with the last bin examined. The multicast add path then ORs the requested port into that unrelated entry's forwarding bitmap, potentially forwarding packets to ports which are not members of the multicast group. Clear the entry before creating a new one. Also return without writing anything when deleting an entry which is not present, instead of writing back stale bin contents. The return value for that case is unchanged (0). Fixes: 5d65b64a3d97 ("net: dsa: b53: Add support for MDB") Signed-off-by: Florian Fainelli Signed-off-by: Willem de Bruijn Signed-off-by: Sasha Levin --- drivers/net/dsa/b53/b53_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c index ca2ba8c157b70..cc42b2a4870ae 100644 --- a/drivers/net/dsa/b53/b53_common.c +++ b/drivers/net/dsa/b53/b53_common.c @@ -2055,9 +2055,13 @@ static int b53_arl_op(struct b53_device *dev, int op, int port, addr, vid); return is_valid ? ret : 0; case -ENOENT: + if (!is_valid) + return 0; + /* We could not find a matching MAC, so reset to a new entry */ dev_dbg(dev->dev, "{%pM,%.4d} not found, using idx: %d\n", addr, vid, idx); + memset(&ent, 0, sizeof(ent)); break; default: dev_dbg(dev->dev, "{%pM,%.4d} found, using idx: %d\n", -- 2.53.0