nfp: flower: avoid taking mutex in atomic context
authorYanguo Li <yanguo.li@corigine.com>
Tue, 31 Jan 2023 08:03:13 +0000 (09:03 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Feb 2023 03:56:11 +0000 (19:56 -0800)
commit9c6b9cbafdc010b38f4077c8252654381eb46028
treeda6c5605d78b786f19ea7f4d2546df1945c4e084
parentcca6e9ff22f79e37da3d73f60c38a84d8ed0c162
nfp: flower: avoid taking mutex in atomic context

A mutex may sleep, which is not permitted in atomic context.
Avoid a case where this may arise by moving the to
nfp_flower_lag_get_info_from_netdev() in nfp_tun_write_neigh() spinlock.

Fixes: abc210952af7 ("nfp: flower: tunnel neigh support bond offload")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Yanguo Li <yanguo.li@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230131080313.2076060-1-simon.horman@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c