Skip to contentSkip to conversation

tipc: fix bug in function tipc_nl_node_dump_monitor

PATCH In review Jon Maloy 2 participants 2 messages Apr 25, 2018 – Apr 27, 2018

Subsystems (3)
lore
Share & tools
lore

Jon Maloy

author
#0 lore raw

PATCH 1/1 tipc: fix bug in function tipc_nl_node_dump_monitor

Commit 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary") intended to fix a problem with user tool looping when max number of bearers are enabled.

Unfortunately, the wrong version of the commit was posted, so the problem was not solved at all.

This commit adds the missing part.

Fixes 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary")
---
 net/tipc/node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/node.c +1 -1
index 6f98b56..baaf93f 100644
@@ -2244,7 +2244,7 @@ int tipc_nl_node_dump_monitor(struct sk_buff *skb, struct netlink_callback *cb)
 
 	rtnl_lock();
 	for (bearer_id = prev_bearer; bearer_id < MAX_BEARERS; bearer_id++) {
-		err = __tipc_nl_add_monitor(net, &msg, prev_bearer);
+		err = __tipc_nl_add_monitor(net, &msg, bearer_id);
 		if (err)
 			break;
 	}
Signature · 1 line
2.1.4
maintainer
#1 lore raw

From: Jon Maloy <[email protected]>
Date: Wed, 25 Apr 2018 18:29:25 +0200

Quoted 11 lines

Commit 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary") intended to fix a problem with user tool looping when max number of bearers are enabled.

Unfortunately, the wrong version of the commit was posted, so the problem was not solved at all.

This commit adds the missing part.

Fixes 36a50a989ee8 ("tipc: fix infinite loop when dumping link monitor summary")

Applied and queued up for -stable, thanks.