From: Jakub Kicinski Date: Tue, 22 May 2018 05:12:50 +0000 (-0700) Subject: devlink: don't take instance lock around eswitch mode set X-Git-Tag: v5.15~8692^2~170^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ac1cc9aef00942cbae01ff39bfc0a93199741e2;p=platform%2Fkernel%2Flinux-starfive.git 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 Acked-by: Jiri Pirko Signed-off-by: David S. Miller --- diff --git a/net/core/devlink.c b/net/core/devlink.c index 5c8a40e..475246b 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,