linux/net/tipc
Tung Nguyen 36a50a989e tipc: fix infinite loop when dumping link monitor summary
When configuring the number of used bearers to MAX_BEARER and issuing
command "tipc link monitor summary", the command enters infinite loop
in user space.

This issue happens because function tipc_nl_node_dump_monitor() returns
the wrong 'prev_bearer' value when all potential monitors have been
scanned.

The correct behavior is to always try to scan all monitors until either
the netlink message is full, in which case we return the bearer identity
of the affected monitor, or we continue through the whole bearer array
until we can return MAX_BEARERS. This solution also caters for the case
where there may be gaps in the bearer array.

Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-18 13:48:43 -04:00
..
Kconfig
Makefile
addr.c
addr.h
bcast.c
bcast.h
bearer.c
bearer.h
core.c
core.h
diag.c tipc: use the right skb in tipc_sk_fill_sock_diag() 2018-04-08 12:34:29 -04:00
discover.c
discover.h
eth_media.c
group.c
group.h
ib_media.c
link.c tipc: avoid possible string overflow 2018-03-31 22:19:52 -04:00
link.h
monitor.c tipc: fix infinite loop when dumping link monitor summary 2018-04-18 13:48:43 -04:00
monitor.h
msg.c
msg.h
name_distr.c tipc: permit overlapping service ranges in name table 2018-03-31 22:19:52 -04:00
name_distr.h tipc: permit overlapping service ranges in name table 2018-03-31 22:19:52 -04:00
name_table.c tipc: fix use-after-free in tipc_nametbl_stop 2018-04-18 13:48:43 -04:00
name_table.h tipc: fix unbalanced reference counter 2018-04-12 21:46:10 -04:00
net.c tipc: fix possible crash in __tipc_nl_net_set() 2018-04-16 18:08:18 -04:00
net.h
netlink.c tipc: fix possible crash in __tipc_nl_net_set() 2018-04-16 18:08:18 -04:00
netlink.h
netlink_compat.c
node.c tipc: fix infinite loop when dumping link monitor summary 2018-04-18 13:48:43 -04:00
node.h
socket.c tipc: fix missing initializer in tipc_sendmsg() 2018-04-12 21:55:38 -04:00
socket.h tipc: use the right skb in tipc_sk_fill_sock_diag() 2018-04-08 12:34:29 -04:00
subscr.c tipc: fix unbalanced reference counter 2018-04-12 21:46:10 -04:00
subscr.h
sysctl.c
topsrv.c
topsrv.h
udp_media.c
udp_media.h