diff options
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r-- | net/tipc/net.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c index 719c5924b638..1a2fde0d6f61 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
@@ -200,7 +200,7 @@ out: | |||
200 | return skb->len; | 200 | return skb->len; |
201 | } | 201 | } |
202 | 202 | ||
203 | int tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info) | 203 | int __tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info) |
204 | { | 204 | { |
205 | struct net *net = sock_net(skb->sk); | 205 | struct net *net = sock_net(skb->sk); |
206 | struct tipc_net *tn = net_generic(net, tipc_net_id); | 206 | struct tipc_net *tn = net_generic(net, tipc_net_id); |
@@ -241,10 +241,19 @@ int tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info) | |||
241 | if (!tipc_addr_node_valid(addr)) | 241 | if (!tipc_addr_node_valid(addr)) |
242 | return -EINVAL; | 242 | return -EINVAL; |
243 | 243 | ||
244 | rtnl_lock(); | ||
245 | tipc_net_start(net, addr); | 244 | tipc_net_start(net, addr); |
246 | rtnl_unlock(); | ||
247 | } | 245 | } |
248 | 246 | ||
249 | return 0; | 247 | return 0; |
250 | } | 248 | } |
249 | |||
250 | int tipc_nl_net_set(struct sk_buff *skb, struct genl_info *info) | ||
251 | { | ||
252 | int err; | ||
253 | |||
254 | rtnl_lock(); | ||
255 | err = __tipc_nl_net_set(skb, info); | ||
256 | rtnl_unlock(); | ||
257 | |||
258 | return err; | ||
259 | } | ||