summaryrefslogtreecommitdiff
path: root/net/devlink
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2023-02-10 13:01:31 +0300
committerDavid S. Miller <davem@davemloft.net>2023-02-13 12:49:14 +0300
commit6b4bfa43ce29165fb0a2a8ef770d94c1d93e5ad8 (patch)
tree63c066beb07d3b8cbde8f58f7cc77fe1d69797e1 /net/devlink
parent280f7b2adca09c8d5f34b99f49e5c570aa81daad (diff)
downloadlinux-6b4bfa43ce29165fb0a2a8ef770d94c1d93e5ad8.tar.xz
devlink: add forgotten devlink instance lock assertion to devl_param_driverinit_value_set()
Driver calling devl_param_driverinit_value_set() has to hold devlink instance lock while doing that. Put an assertion there. Signed-off-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/devlink')
-rw-r--r--net/devlink/leftover.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
index d4c896f89905..3569706c49e1 100644
--- a/net/devlink/leftover.c
+++ b/net/devlink/leftover.c
@@ -9681,6 +9681,8 @@ void devl_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
{
struct devlink_param_item *param_item;
+ devl_assert_locked(devlink);
+
param_item = devlink_param_find_by_id(&devlink->params, param_id);
if (WARN_ON(!param_item))
return;