octeontx2-af: Fix multicast/mirror group lock/unlock issue
authorSuman Ghosh <sumang@marvell.com>
Wed, 13 Dec 2023 09:53:49 +0000 (15:23 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Dec 2023 10:11:34 +0000 (10:11 +0000)
commit10b7572d17871b027de1d17152f08a2dc9c3aef6
tree0793be1edb8c410f57892afd8d5aad924dfa117c
parent12da68e27b476fa38cf9c72c1d3887f3698d1f2c
octeontx2-af: Fix multicast/mirror group lock/unlock issue

As per the existing implementation, there exists a race between finding
a multicast/mirror group entry and deleting that entry. The group lock
was taken and released independently by rvu_nix_mcast_find_grp_elem()
function. Which is incorrect and group lock should be taken during the
entire operation of group updation/deletion. This patch fixes the same.

Fixes: 51b2804c19cd ("octeontx2-af: Add new mbox to support multicast/mirror offload")
Signed-off-by: Suman Ghosh <sumang@marvell.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c