From: Jon Maloy Date: Wed, 25 Apr 2018 16:29:25 +0000 (+0200) Subject: tipc: fix bug in function tipc_nl_node_dump_monitor X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d33c9d0fbd8a5a5f2dfc4affb7f9f97cb86afd0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tipc: fix bug in function tipc_nl_node_dump_monitor [ Upstream commit 7dbc73e6124ce4d0cfbdd6166de388e9367c47ad ] 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") Signed-off-by: Jon Maloy Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/tipc/node.c b/net/tipc/node.c index 0d97395d60d5..47c67e5b5793 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -2125,7 +2125,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; }