From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.7 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793091174; b=Ka4/PlIMloyac1mCNGVhFOFZ4Wu75FNYRD7nAQaDethSGgpdZomj/XwUQvBUuRJG378o bnQdiPONvlaygtbqblpFvTWHI7rIj3dVL2ssXd0r2YrdMzHLbQZWtddP2TY/VK3pgpm3M FqpwifeUpkHSx0pSz0vaGpciNjE/otAhneZW39YaT53lJgQCCwm5csVk4miT3825D+rkP F5XmfhsJNWNOzTV7YMQeFZ9cW2vXa8OU8oPhqmce6rvowx/Ouw1EbubnKc2ClgLwanTKh wjjfvVoYv1u/pfRMw0kxdL5IDfEYyZI1YGpj5XVnXrMyG2FXnZylL0gb4JU/YPt8qhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793091174; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo; bh=ZvZnWihFbxw483qh4KeYM/1CzNFyVp8lIcdiBtlen3M=; b=BzQosOsHoiiKpDYqtnkgG+sqsB0TNDxUlFvyafZSIRmonK13k8hJu3nrpo0SYqJJw9Bg CB5Huarjudx5+NCHjxmYRhTzKvM1Rdavo5hDrJxQmD0CHeKCbFKjp8JstK9yBKH5HYQ3q qJPxHup/3+nkShsGyZUfWcS0dARvjqLH+riM1pSziCzhYNdmIawjGHpyaqwb/r57m4fYo 57V31bwW01+rZG+WmrSI+fCFtRLLS6mLN/OZFRBncNue4A8/x8h+r4obAymECHgPwxbEP SEgC4dwC3aWgVAv1vz3ENcW3O/UBiWySLNHkLLIiEBseXKkaf3bFvULsjPzK5su+Jzg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b="oFA46/Eq"; arc=none smtp.remote-ip=220.197.31.7 Received: from m16.mail.126.com (m16.mail.126.com [220.197.31.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4DE606A31A; Tue, 27 Oct 2026 08:52:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2E4DE606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=oFA46/Eq DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Zv ZnWihFbxw483qh4KeYM/1CzNFyVp8lIcdiBtlen3M=; b=oFA46/Eq8QxcasNRIA 4jWYHtRr1xdc2ztzFZsbbdze6+3AMhxnEPBOWHa93r33KRfGyjWjkFkgGy/E2uxm VGIkILhxS8B+T4whXK/Dj1ysdzBXkrCpwW2iSywhw7y7W2qCkxKXYkzsHdMucw8r WRmjNh9FbCiZ6x/nLPgtTHb5k= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g1-0 (Coremail) with SMTP id _____wD3H+UzZuBqVA77BA--.59983S2; Tue, 27 Oct 2026 16:52:05 +0800 (CST) From: Linkui Xiao To: razor@blackwall.org, idosch@nvidia.com, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org Cc: bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Linkui Xiao Subject: [PATCH net] net: bridge: netlink: do not clear the vlan info dump error Date: Tue, 27 Oct 2026 16:52:00 +0800 Message-Id: <20261027085200.1501599-1-xiaolinkui@126.com> X-Mailer: git-send-email 2.25.1 X-Mailing-List: linux-kernel@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 X-CM-TRANSID:_____wD3H+UzZuBqVA77BA--.59983S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tryUur45tr45GF1xCrWUtwb_yoW8Aw15pF 4Y9r9xJrWqqay8Kw109F4jqa43ZwnxGFW5CFn2kryIyF90gF1kZFZ5KFZ3Cw1UAF4kJFWY v3ZFqr1Yyrn8uFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UlhFsUUUUU= X-CM-SenderInfo: p0ld0z5lqn3xa6rslhhfrp/xtbBlBV5UGrgZjUJcQAA3J From: Linkui Xiao br_fill_ifinfo() assigns the result of br_fill_vlan_tunnel_info() over the result of br_fill_ifvlaninfo() or br_fill_ifvlaninfo_compressed() instead of only running the second helper when the first one succeeded. When the vlan information no longer fits in the skb but the port has no vlan mapped to a tunnel dst, br_fill_vlan_tunnel_info() walks the vlan list and returns 0 without touching the skb. The -EMSGSIZE is lost, br_fill_ifinfo() completes a message whose IFLA_AF_SPEC is truncated, and the dump carries on to the next interface instead of stopping, so userspace silently sees an incomplete vlan list. Only fill the tunnel information when the vlan information was filled successfully. This was flagged as a pre-existing issue in the Sashiko review of the net-next series, which noted that the VLAN fill result is overwritten before it is tested (see the Link tag below). Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Link: https://lore.kernel.org/bridge/ed1de95e-e112-4076-93f0-6f7668e657ad@blackwall.org/T/#u#5 Signed-off-by: Linkui Xiao --- net/bridge/br_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c index b2cd4e39326d..8ed86bf71a00 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -540,7 +540,7 @@ static int br_fill_ifinfo(struct sk_buff *skb, else err = br_fill_ifvlaninfo(skb, vg); - if (port && test_bit(BR_VLAN_TUNNEL_BIT, &port->flags)) + if (!err && port && test_bit(BR_VLAN_TUNNEL_BIT, &port->flags)) err = br_fill_vlan_tunnel_info(skb, vg); rcu_read_unlock(); if (err) -- 2.25.1