Skip to content

Commit 6b4bfa4

Browse files
Jiri Pirkodavem330
authored andcommitted
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 <[email protected]> Reviewed-by: Simon Horman <[email protected]> Acked-by: Jakub Kicinski <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 280f7b2 commit 6b4bfa4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/devlink/leftover.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9681,6 +9681,8 @@ void devl_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
96819681
{
96829682
struct devlink_param_item *param_item;
96839683

9684+
devl_assert_locked(devlink);
9685+
96849686
param_item = devlink_param_find_by_id(&devlink->params, param_id);
96859687
if (WARN_ON(!param_item))
96869688
return;

0 commit comments

Comments
 (0)