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 5878769E08; Wed, 21 Feb 2024 13:38:55 +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=1708522736; cv=none; b=B8Eeu0JsuSSNmKHjB1FQu29F8ob5IXigptd2NfWXzUxLw1HphqUB5HlrNBcG9c1jl8RVUuO3P7eP3KUE5GwD1oKMLuxwmqXR/qxp0nbGgH7CnBxqTIe1U5A7zpbJxIfCChZliF6hH3taDzXNrJ7utsxUcs9R0jmv5f4JiBV9Aks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708522736; c=relaxed/simple; bh=ULMJIpUvi2o7bI0yht+7ZnpWPlNhUPiJMjkaLgQxMUc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c4u8doC4uZ8198ze3pGl15g/1lKqYcIqkyDzpEik+M1qw683eZO7qNmMSk0VWPUQ/8UaSG0v8I7mcUb7zGSd3ZXHWmk2aRty3VbnEHXf7RRtOa2lOyPne9LcT1ToHGuaNM6unKFBHgUJE1IUYX6hM/80+210ZhkY4buZl40dZ0E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XPzt5gS7; 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="XPzt5gS7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78176C433C7; Wed, 21 Feb 2024 13:38:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1708522735; bh=ULMJIpUvi2o7bI0yht+7ZnpWPlNhUPiJMjkaLgQxMUc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XPzt5gS7ou4eQivFQ4bMrWbYOg2Yv7zeTudFJWtYk97YCd4JLPORnBK2dK73/+ONI BszntBtAs4k8jiD7RkH5W2lGdGspX6LQMrYYaoZsgn1v9x0HNyUjlQ1iSkrempPA4a RbM7UK0FvDiMI6GRt56fps3t3oJZfHrkgpPxUcDA= 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 5.15 205/476] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Date: Wed, 21 Feb 2024 14:04:16 +0100 Message-ID: <20240221130015.496218051@linuxfoundation.org> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240221130007.738356493@linuxfoundation.org> References: <20240221130007.738356493@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 5.15-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