devlink: protect health reporter operation with instance lock
authorJiri Pirko <jiri@nvidia.com>
Wed, 18 Jan 2023 15:21:08 +0000 (16:21 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 20 Jan 2023 03:08:37 +0000 (19:08 -0800)
commitdfdfd1305ddecb990566193f2ba8a11bccba4cde
treee3b65f5f1a722af8d83c4547c41ad4415829f2af
parent65a20c2eb96d698206846b27f9ac5ab05a24d569
devlink: protect health reporter operation with instance lock

Similar to other devlink objects, protect the reporters list
by devlink instance lock. Alongside add unlocked versions
of health reporter create/destroy functions and use them in drivers
on call paths where the instance lock is held.

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/netdevsim/health.c
include/net/devlink.h
net/devlink/leftover.c