lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YQK9fxkb0FIYkzbx@unreal>
Date:   Thu, 29 Jul 2021 17:38:55 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     Jiri Pirko <jiri@...nulli.us>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, Jiri Pirko <jiri@...dia.com>,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        Parav Pandit <parav@...dia.com>
Subject: Re: [PATCH net-next v1 1/2] devlink: Break parameter notification
 sequence to be before/after unload/load driver

On Thu, Jul 29, 2021 at 04:33:58PM +0200, Jiri Pirko wrote:
> Thu, Jul 29, 2021 at 03:17:49PM CEST, leon@...nel.org wrote:
> >From: Leon Romanovsky <leonro@...dia.com>

<...>

> >+static void devlink_ns_change_notify(struct devlink *devlink,
> >+				     struct net *dest_net, struct net *curr_net,
> >+				     enum devlink_command cmd, bool new)
> 
> Drop the cmd and determine the DEVLINK_CMD_PARAM_NEW/DEL by "new" arg as
> well. I thought I wrote that clearly in my previous review, but
> apparently not, sorry about that.
> 
> 
> 
> > {
> > 	struct devlink_param_item *param_item;
> > 
> >@@ -3812,17 +3813,17 @@ static void devlink_reload_netns_change(struct devlink *devlink,
> > 	 * reload process so the notifications are generated separatelly.
> > 	 */
> > 
> >-	list_for_each_entry(param_item, &devlink->param_list, list)
> >-		devlink_param_notify(devlink, 0, param_item,
> >-				     DEVLINK_CMD_PARAM_DEL);
> >-	devlink_notify(devlink, DEVLINK_CMD_DEL);
> >+	if (!dest_net || net_eq(dest_net, curr_net))
> >+		return;
> > 
> >-	__devlink_net_set(devlink, dest_net);
> >+	if (new)
> >+		devlink_notify(devlink, DEVLINK_CMD_NEW);
> > 
> >-	devlink_notify(devlink, DEVLINK_CMD_NEW);
> > 	list_for_each_entry(param_item, &devlink->param_list, list)
> >-		devlink_param_notify(devlink, 0, param_item,
> >-				     DEVLINK_CMD_PARAM_NEW);
> >+		devlink_param_notify(devlink, 0, param_item, cmd);
> 
> Like this:
> 		devlink_param_notify(devlink, 0, param_item, new ?
> 				     DEVLINK_CMD_PARAM_NEW ?
> 				     DEVLINK_CMD_PARAM_DEL);

IMHO it is not nice, but will change.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ