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>
This commit is contained in:
Родитель
280f7b2adc
Коммит
6b4bfa43ce
|
@ -9681,6 +9681,8 @@ void devl_param_driverinit_value_set(struct devlink *devlink, u32 param_id,
|
||||||
{
|
{
|
||||||
struct devlink_param_item *param_item;
|
struct devlink_param_item *param_item;
|
||||||
|
|
||||||
|
devl_assert_locked(devlink);
|
||||||
|
|
||||||
param_item = devlink_param_find_by_id(&devlink->params, param_id);
|
param_item = devlink_param_find_by_id(&devlink->params, param_id);
|
||||||
if (WARN_ON(!param_item))
|
if (WARN_ON(!param_item))
|
||||||
return;
|
return;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче