[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c31ba60f-3276-45ed-d2ed-23b6dca7d245@intel.com>
Date: Fri, 10 Feb 2023 11:42:01 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jiri Pirko <jiri@...nulli.us>, <netdev@...r.kernel.org>
CC: <davem@...emloft.net>, <kuba@...nel.org>, <pabeni@...hat.com>,
<edumazet@...gle.com>, <tariqt@...dia.com>, <saeedm@...dia.com>,
<gal@...dia.com>, <kim.phillips@....com>, <moshe@...dia.com>,
<simon.horman@...igine.com>, <idosch@...dia.com>
Subject: Re: [patch net-next v2 7/7] devlink: add forgotten devlink instance
lock assertion to devl_param_driverinit_value_set()
On 2/10/2023 2:01 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@...dia.com>
>
> 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@...dia.com>
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
> Acked-by: Jakub Kicinski <kuba@...nel.org>
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> net/devlink/leftover.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
> index 9f0256c2c323..38cdbc2039dd 100644
> --- a/net/devlink/leftover.c
> +++ b/net/devlink/leftover.c
> @@ -9682,6 +9682,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;
Powered by blists - more mailing lists