diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-05-21 22:12:50 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-23 14:26:19 -0400 |
commit | 7ac1cc9aef00942cbae01ff39bfc0a93199741e2 (patch) | |
tree | 5c6ba5c22149ffb289bd3e4a6047804db1290369 /net/core/devlink.c | |
parent | 634c6b7a85d46a891b2edee075bb422043dcb8da (diff) | |
download | linux-stable-7ac1cc9aef00942cbae01ff39bfc0a93199741e2.tar.gz linux-stable-7ac1cc9aef00942cbae01ff39bfc0a93199741e2.tar.bz2 linux-stable-7ac1cc9aef00942cbae01ff39bfc0a93199741e2.zip |
devlink: don't take instance lock around eswitch mode set
Changing switch mode may want to register and unregister devlink
ports. Therefore similarly to DEVLINK_CMD_PORT_SPLIT/UNSPLIT it
should not take the instance lock. Drivers don't depend on existing
locking since it's a very recent addition.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/devlink.c')
-rw-r--r-- | net/core/devlink.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 5c8a40e1a01e..475246b355f0 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -2756,7 +2756,8 @@ static const struct genl_ops devlink_nl_ops[] = { .doit = devlink_nl_cmd_eswitch_set_doit, .policy = devlink_nl_policy, .flags = GENL_ADMIN_PERM, - .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK, + .internal_flags = DEVLINK_NL_FLAG_NEED_DEVLINK | + DEVLINK_NL_FLAG_NO_LOCK, }, { .cmd = DEVLINK_CMD_DPIPE_TABLE_GET, |