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 14DDA4F21B; Sat, 3 Feb 2024 04:17:10 +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=1706933830; cv=none; b=hUOM9dWhSfIEIqsFr+eOco6IF8ykMPs1WaZs2HHz7nEj7Z+3MedR6oSni42n+5eO65AYJTuSfEh9BODM9Yiyz88Ba60Xj/RpntF6vXyjxoHzMDrN3yb62kiE9j9B2DoNwK0nkUGIfEtDslADnQdsahM2Jo8pKOYZ/hhcngOi0Z4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706933830; c=relaxed/simple; bh=E1mVyUCH6Yy7sT4Q32z1sFFyW8Kc4pRXHd3Zbgf/PWQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iLz/4g6iMJDLbuanbjsXAaqtrjCjUZS8oXtTJMILWCm2OlQhS61dRMn69CeS+wTS/QKZ+awyq+02aZ9UGsEkt8USBO4hqOsg+Qecj123RUmf/DwAU45RAtB+plAwipnzYvCLwcENmDctYKHM9SK7xHWbqzZb7giiFNRthcY4qgA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Qg2NHz5S; 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="Qg2NHz5S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1D02C43394; Sat, 3 Feb 2024 04:17:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1706933829; bh=E1mVyUCH6Yy7sT4Q32z1sFFyW8Kc4pRXHd3Zbgf/PWQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qg2NHz5SlF/uq8d5xQddC4mda5pIxDH4dtXOM8+P6xnu5/XiWASRSWrEbLbcnshsx 0WFov/cLxbGq8bgi52MWKjy+meoYZemyzra3E6b4+t3DocaOK0Pqj2VMy7lJWxcnSM 6hVeeDTRxI+jBdkQrlca3FsESi+geQfx1ihpZTe4= 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.7 153/353] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Date: Fri, 2 Feb 2024 20:04:31 -0800 Message-ID: <20240203035408.505609676@linuxfoundation.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240203035403.657508530@linuxfoundation.org> References: <20240203035403.657508530@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.7-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