From: Jakub Kicinski <jakub.kicinski@netronome•com>
To: Jiri Pirko <jiri@resnulli•us>
Cc: netdev@vger•kernel.org, davem@davemloft•net,
stephen@networkplumber•org, dsahern@gmail•com,
mlxsw@mellanox•com
Subject: Re: [patch net-next v3 1/3] net: devlink: allow to change namespaces
Date: Mon, 12 Aug 2019 18:21:22 -0700 [thread overview]
Message-ID: <20190812182122.5bc71d30@cakuba.netronome.com> (raw)
In-Reply-To: <20190812134751.30838-2-jiri@resnulli.us>
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
next prev parent reply other threads:[~2019-08-13 1:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-12 13:47 [patch net-next v3 0/3] net: devlink: Finish network namespace support Jiri Pirko
2019-08-12 13:47 ` [patch net-next v3 1/3] net: devlink: allow to change namespaces Jiri Pirko
2019-08-13 1:21 ` Jakub Kicinski [this message]
2019-08-13 6:13 ` Jiri Pirko
2019-08-13 17:04 ` Jakub Kicinski
2019-08-12 13:47 ` [patch net-next v3 2/3] net: devlink: export devlink net set/get helpers Jiri Pirko
2019-08-12 13:47 ` [patch net-next v3 3/3] netdevsim: create devlink and netdev instances in namespace Jiri Pirko
2019-08-12 13:51 ` [patch iproute2-next v3 1/2] devlink: introduce cmdline option to switch to a different namespace Jiri Pirko
2019-08-12 13:51 ` [patch iproute2-next v3 2/2] devlink: add support for network namespace change Jiri Pirko
2019-08-13 0:24 ` [patch net-next v3 0/3] net: devlink: Finish network namespace support David Ahern
2019-08-13 1:11 ` Jakub Kicinski
2019-08-13 1:46 ` David Ahern
2019-08-13 17:45 ` Jakub Kicinski
2019-08-13 6:07 ` Jiri Pirko
2019-08-13 6:09 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190812182122.5bc71d30@cakuba.netronome.com \
--to=jakub.kicinski@netronome$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=jiri@resnulli$(echo .)us \
--cc=mlxsw@mellanox$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=stephen@networkplumber$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox