[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812182122.5bc71d30@cakuba.netronome.com>
Date: Mon, 12 Aug 2019 18:21:22 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, davem@...emloft.net,
stephen@...workplumber.org, dsahern@...il.com, mlxsw@...lanox.com
Subject: Re: [patch net-next v3 1/3] net: devlink: allow to change
namespaces
On Mon, 12 Aug 2019 15:47:49 +0200, Jiri Pirko wrote:
> @@ -6953,9 +7089,33 @@ int devlink_compat_switch_id_get(struct net_device *dev,
> return 0;
> }
>
> +static void __net_exit devlink_pernet_exit(struct net *net)
> +{
> + struct devlink *devlink;
> +
> + mutex_lock(&devlink_mutex);
> + list_for_each_entry(devlink, &devlink_list, list)
> + if (net_eq(devlink_net(devlink), net))
> + devlink_netns_change(devlink, &init_net);
> + mutex_unlock(&devlink_mutex);
> +}
Just to be sure - this will not cause any locking issues?
Usually the locking order goes devlink -> rtnl
Powered by blists - more mailing lists