devlink: hold the instance lock during eswitch_mode callbacks
authorJakub Kicinski <kuba@kernel.org>
Fri, 18 Mar 2022 19:23:44 +0000 (12:23 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Mar 2022 14:11:38 +0000 (14:11 +0000)
commit14e426bf1a4d77ac87d0fa2a964092a23f863e44
treed4f9bb5b5757380586328e8b6433a8b7fff3da71
parentaff3a925094633a5b77058b9a715efbb12fc2698
devlink: hold the instance lock during eswitch_mode callbacks

Make the devlink core hold the instance lock during eswitch_mode
callbacks. Cheat in case of mlx5 (see the cover letter).

Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_vfr.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/netronome/nfp/nfp_devlink.c
drivers/net/netdevsim/dev.c
net/core/devlink.c