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 10:59:15 +0000 (11:59 +0100)
commit6ea5273c71dd2d07c0a2459594eb34bc087939f7
tree076c8dddced02a5cc4b33dd4762c80802bca49b3
parent4e5f2c74cbbf5ff700d1ddb04312b36f5348b1c0
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