From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A3DBF111AE; Sat, 3 Feb 2024 04:10:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933405; cv=none; b=RxwfDdGUapChsxXeDjoEc5+rR1ny5Z7auIU5lDFcCz1uh0SAXVxbKW8taG5yjBkVuE9KxoENxOVsgFuY9euNYj/eWO4upELCpdyZ42rTv3TEesa9IUUbdASmkFSJzHyIky4ipkUYMKnpnPQkWoMbJN6mK56j++9TebOnNcKJ+rQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933405; c=relaxed/simple; bh=86/hVDGwj1+bX1Ytb8MWtznzl2lF2BGWzQWDejgzrj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SVaE2eL06PEcofOfKJOrQeuiXYsLbmE+yC9wkIs9CRuuPhRNmWiEtQv/Q6Y0rNgLeEOGUbtzGWHw2BcVZPqcYUBmLnCRXHFMIgPl2QQ13QeXmdEkyBA1/+zLTAad7NJw2/Upq8A3SkJCEb9SsV0E7L1RIWmFOAOCPkaJ+VK0lYw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=k+XS8fBU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="k+XS8fBU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A985C43390; Sat, 3 Feb 2024 04:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933405; bh=86/hVDGwj1+bX1Ytb8MWtznzl2lF2BGWzQWDejgzrj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k+XS8fBUiS8qx/3Qx3hFahh46vKz0r5h7dFBSAOCY359ZPF2+VB1L+tTYb8EZ9RpV os5YBFy/BjV/K6VO/X2hHnxIQrfreN8FzqQjUcDVXHf62rVNQtuvqyIPNy+n3panP3 TmfC5BmkFhQQHRdHlYTd3J7sXFUFpgFdgiB55UXY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lin Ma , Simon Horman , Nikolay Aleksandrov , "David S. Miller" , Sasha Levin Subject: [PATCH 6.1 100/219] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Date: Fri, 2 Feb 2024 20:04:33 -0800 Message-ID: <20240203035331.373440857@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035317.354186483@linuxfoundation.org> References: <20240203035317.354186483@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lin Ma [ 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 Reviewed-by: Simon Horman Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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