octeontx2-pf: Fix lmtst ID used in aura free
authorGeetha sowjanya <gakula@marvell.com>
Tue, 3 Jan 2023 03:50:12 +0000 (09:20 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:02:29 +0000 (12:02 +0100)
commit667ce030bdfb62a86266444b2c3fd6ab98b9df9b
tree78cd994d6e07ad88e93c24f12e14065fc771929f
parentfaecbaf1ffcdbc7d4ab7c6ad7e222d14a2d71771
octeontx2-pf: Fix lmtst ID used in aura free

[ Upstream commit 4af1b64f80fbe1275fb02c5f1c0cef099a4a231f ]

Current code uses per_cpu pointer to get the lmtst_id mapped to
the core on which aura_free() is executed. Using per_cpu pointer
without preemption disable causing mismatch between lmtst_id and
core on which pointer gets freed. This patch fixes the issue by
disabling preemption around aura_free.

Fixes: ef6c8da71eaf ("octeontx2-pf: cn10K: Reserve LMTST lines per core")
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c