[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190813100450.55336597@cakuba.netronome.com>
Date: Tue, 13 Aug 2019 10:04:50 -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 Tue, 13 Aug 2019 08:13:55 +0200, Jiri Pirko wrote:
> Tue, Aug 13, 2019 at 03:21:22AM CEST, jakub.kicinski@...ronome.com wrote:
> >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
>
> rtnl is not taken. Do I miss something?
Probably not, just double checking.
Powered by blists - more mailing lists