netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Lin Ma <linma@zju.edu.cn>, Simon Horman <horms@kernel.org>,
	Nikolay Aleksandrov <razor@blackwall.org>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	roopa@nvidia.com, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, bridge@lists.linux.dev,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 6.7 101/108] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse
Date: Tue, 16 Jan 2024 14:40:07 -0500	[thread overview]
Message-ID: <20240116194225.250921-101-sashal@kernel.org> (raw)
In-Reply-To: <20240116194225.250921-1-sashal@kernel.org>

From: Lin Ma <linma@zju.edu.cn>

[ Upstream commit c2b2ee36250d967c21890cb801e24af4b6a9eaa5 ]

It appears that there is a typo in the code where the nlattr array is
being parsed with policy br_cfm_cc_ccm_tx_policy, but the instance is
being accessed via IFLA_BRIDGE_CFM_CC_RDI_INSTANCE, which is associated
with the policy br_cfm_cc_rdi_policy.

This problem was introduced by commit 2be665c3940d ("bridge: cfm: Netlink
SET configuration Interface.").

Though it seems like a harmless typo since these two enum owns the exact
same value (1 here), it is quite misleading hence fix it by using the
correct enum IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE here.

Signed-off-by: Lin Ma <linma@zju.edu.cn>
Reviewed-by: Simon Horman <horms@kernel.org>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 net/bridge/br_cfm_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bridge/br_cfm_netlink.c b/net/bridge/br_cfm_netlink.c
index 5c4c369f8536..2faab44652e7 100644
--- a/net/bridge/br_cfm_netlink.c
+++ b/net/bridge/br_cfm_netlink.c
@@ -362,7 +362,7 @@ static int br_cc_ccm_tx_parse(struct net_bridge *br, struct nlattr *attr,
 
 	memset(&tx_info, 0, sizeof(tx_info));
 
-	instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_RDI_INSTANCE]);
+	instance = nla_get_u32(tb[IFLA_BRIDGE_CFM_CC_CCM_TX_INSTANCE]);
 	nla_memcpy(&tx_info.dmac.addr,
 		   tb[IFLA_BRIDGE_CFM_CC_CCM_TX_DMAC],
 		   sizeof(tx_info.dmac.addr));
-- 
2.43.0


  parent reply	other threads:[~2024-01-16 19:46 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240116194225.250921-1-sashal@kernel.org>
2024-01-16 19:38 ` [PATCH AUTOSEL 6.7 019/108] net: phy: micrel: fix ts_info value in case of no phc Sasha Levin
2024-01-16 19:38 ` [PATCH AUTOSEL 6.7 021/108] r8169: improve RTL8411b phy-down fixup Sasha Levin
2024-01-17  1:43   ` Jakub Kicinski
2024-01-17 10:30     ` Mirsad Todorovac
2024-01-17 11:10       ` Heiner Kallweit
2024-01-17 13:44       ` Andrew Lunn
2024-01-17 16:35         ` Mirsad Todorovac
2024-01-17 17:04           ` Andrew Lunn
2024-01-16 19:38 ` [PATCH AUTOSEL 6.7 022/108] bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk Sasha Levin
2024-01-16 19:38 ` [PATCH AUTOSEL 6.7 023/108] net: usb: ax88179_178a: avoid two consecutive device resets Sasha Levin
2024-01-16 19:38 ` [PATCH AUTOSEL 6.7 031/108] bpf: Fix a few selftest failures due to llvm18 change Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 036/108] bnxt_en: Add 5760X (P7) PCI IDs Sasha Levin
2024-01-16 19:47   ` Michael Chan
2024-01-30 21:44     ` Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 043/108] net: mvmdio: Avoid excessive sleeps in polled mode Sasha Levin
2024-01-17  1:42   ` Jakub Kicinski
2024-01-17  1:54     ` Andrew Lunn
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 050/108] net: wangxun: fix changing mac failed when running Sasha Levin
2024-01-17  1:39   ` Jakub Kicinski
2024-01-30 22:51     ` Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 060/108] net: phy: at803x: fix passing the wrong reference for config_intr Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 061/108] ionic: pass opcode to devcmd_wait Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 062/108] ionic: bypass firmware cmds when stuck in reset Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 066/108] selftests/bpf: fix compiler warnings in RELEASE=1 mode Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 075/108] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 076/108] net: atlantic: eliminate double free in error handling logic Sasha Levin
2024-01-17  1:38   ` Jakub Kicinski
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 077/108] net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 087/108] intel: add bit macro includes where needed Sasha Levin
2024-01-16 19:39 ` [PATCH AUTOSEL 6.7 088/108] ice: fix pre-shifted bit usage Sasha Levin
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 095/108] wifi: cfg80211: free beacon_ies when overridden from hidden BSS Sasha Levin
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 100/108] net/smc: disable SEID on non-s390 archs where virtual ISM may be used Sasha Levin
2024-01-16 19:40 ` Sasha Levin [this message]
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 104/108] i40e: Fix VF disable behavior to block all traffic Sasha Levin
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 105/108] octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry Sasha Levin
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 106/108] net: kcm: fix direct access to bv_len Sasha Levin
2024-01-16 19:40 ` [PATCH AUTOSEL 6.7 107/108] net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure Sasha Levin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240116194225.250921-101-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linma@zju.edu.cn \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).