Commit 7d259505 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

team: rtnl_lock for options set

During options set, there will be needed to hold rtnl_mutex in order to
safely call netdev notifiers.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb1b2e3c
...@@ -2422,9 +2422,13 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info) ...@@ -2422,9 +2422,13 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
struct nlattr *nl_option; struct nlattr *nl_option;
LIST_HEAD(opt_inst_list); LIST_HEAD(opt_inst_list);
rtnl_lock();
team = team_nl_team_get(info); team = team_nl_team_get(info);
if (!team) if (!team) {
return -EINVAL; err = -EINVAL;
goto rtnl_unlock;
}
err = -EINVAL; err = -EINVAL;
if (!info->attrs[TEAM_ATTR_LIST_OPTION]) { if (!info->attrs[TEAM_ATTR_LIST_OPTION]) {
...@@ -2551,7 +2555,8 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info) ...@@ -2551,7 +2555,8 @@ static int team_nl_cmd_options_set(struct sk_buff *skb, struct genl_info *info)
team_put: team_put:
team_nl_team_put(team); team_nl_team_put(team);
rtnl_unlock:
rtnl_unlock();
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment