]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
octeontx2-af: Check return value of nix_get_nixlf before using nixlf
authorSubbaraya Sundeep <sbhatta@marvell.com>
Wed, 29 Nov 2023 05:41:48 +0000 (11:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:34 +0000 (18:36 +0100)
commitf258a0bed30809afd4d5e2b092dbe6ee9175af25
tree7ac1d65df528294b02f53ef3962143725d075d11
parent51e7868e5df93f31e90cbd47c9087927baa9adf8
octeontx2-af: Check return value of nix_get_nixlf before using nixlf

[ Upstream commit 830139e7b6911266a84a77e1f18abf758995cc89 ]

If a NIXLF is not attached to a PF/VF device then
nix_get_nixlf function fails and returns proper error
code. But npc_get_default_entry_action does not check it
and uses garbage value in subsequent calls. Fix this
by cheking the return value of nix_get_nixlf.

Fixes: 967db3529eca ("octeontx2-af: add support for multicast/promisc packet replication feature")
Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_npc.c