diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 15:08:26 +0300 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-30 15:08:26 +0300 | 
| commit | cd4846c5a68da77705164924f47001af3b499dec (patch) | |
| tree | 226295e35148ee7a9d303c6a218790b7a8107976 /net/tipc/node.c | |
| parent | 9ee84466b7130360d07241baf4c95a553fc0a997 (diff) | |
| parent | 6da6c0db5316275015e8cc2959f12a17584aeb64 (diff) | |
| download | linux-cd4846c5a68da77705164924f47001af3b499dec.tar.xz | |
Merge 4.17-rc3 into driver-core-next
We want the fixes in here as well for testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/tipc/node.c')
| -rw-r--r-- | net/tipc/node.c | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index c77dd2f3c589..6f98b56dd48e 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -2232,8 +2232,8 @@ int tipc_nl_node_dump_monitor(struct sk_buff *skb, struct netlink_callback *cb)  	struct net *net = sock_net(skb->sk);  	u32 prev_bearer = cb->args[0];  	struct tipc_nl_msg msg; +	int bearer_id;  	int err; -	int i;  	if (prev_bearer == MAX_BEARERS)  		return 0; @@ -2243,16 +2243,13 @@ int tipc_nl_node_dump_monitor(struct sk_buff *skb, struct netlink_callback *cb)  	msg.seq = cb->nlh->nlmsg_seq;  	rtnl_lock(); -	for (i = prev_bearer; i < MAX_BEARERS; i++) { -		prev_bearer = i; +	for (bearer_id = prev_bearer; bearer_id < MAX_BEARERS; bearer_id++) {  		err = __tipc_nl_add_monitor(net, &msg, prev_bearer);  		if (err) -			goto out; +			break;  	} - -out:  	rtnl_unlock(); -	cb->args[0] = prev_bearer; +	cb->args[0] = bearer_id;  	return skb->len;  }  | 
