nfp: flower: fix for take a mutex lock in soft irq context and rcu lock
authorHui Zhou <hui.zhou@corigine.com>
Tue, 5 Dec 2023 09:26:25 +0000 (11:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:45:23 +0000 (18:45 +0100)
commit9a89aad0865f0a1a3d20716d0365085065eba713
treec270d1b853067d8fac65d1eabdd0faeabb280eeb
parent3c0adff939a6e1798be92098941c632b85820313
nfp: flower: fix for take a mutex lock in soft irq context and rcu lock

commit 0ad722bd9ee3a9bdfca9613148645e4c9b7f26cf upstream.

The neighbour event callback call the function nfp_tun_write_neigh,
this function will take a mutex lock and it is in soft irq context,
change the work queue to process the neighbour event.

Move the nfp_tun_write_neigh function out of range rcu_read_lock/unlock()
in function nfp_tunnel_request_route_v4 and nfp_tunnel_request_route_v6.

Fixes: abc210952af7 ("nfp: flower: tunnel neigh support bond offload")
CC: stable@vger.kernel.org # 6.2+
Signed-off-by: Hui Zhou <hui.zhou@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c