kernel_optimize_test/net/tipc
Tuong Lien 980d69276f tipc: fix partial topology connection closure
When an application connects to the TIPC topology server and subscribes
to some services, a new connection is created along with some objects -
'tipc_subscription' to store related data correspondingly...
However, there is one omission in the connection handling that when the
connection or application is orderly shutdown (e.g. via SIGQUIT, etc.),
the connection is not closed in kernel, the 'tipc_subscription' objects
are not freed too.
This results in:
- The maximum number of subscriptions (65535) will be reached soon, new
subscriptions will be rejected;
- TIPC module cannot be removed (unless the objects  are somehow forced
to release first);

The commit fixes the issue by closing the connection if the 'recvmsg()'
returns '0' i.e. when the peer is shutdown gracefully. It also includes
the other unexpected cases.

Acked-by: Jon Maloy <jmaloy@redhat.com>
Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Tuong Lien <tuong.t.lien@dektech.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-05-04 10:31:13 -07:00
..
addr.c
addr.h
bcast.c
bcast.h
bearer.c
bearer.h
core.c
core.h
crypto.c tipc: Fix potential tipc_aead refcnt leak in tipc_crypto_rcv 2020-04-18 13:17:04 -07:00
crypto.h
diag.c
discover.c
discover.h
eth_media.c
group.c
group.h
ib_media.c
Kconfig
link.c tipc: fix incorrect increasing of link window 2020-04-15 16:23:33 -07:00
link.h
Makefile
monitor.c tipc: add NULL pointer check to prevent kernel oops 2020-03-15 00:07:00 -07:00
monitor.h
msg.c tipc: simplify trivial boolean return 2020-03-15 00:07:00 -07:00
msg.h tipc: Add a missing case of TIPC_DIRECT_MSG type 2020-03-26 11:21:02 -07:00
name_distr.c
name_distr.h
name_table.c
name_table.h
net.c
net.h
netlink_compat.c
netlink.c tipc: add missing attribute validation for MTU property 2020-03-03 13:28:49 -08:00
netlink.h
node.c tipc: Fix potential tipc_node refcnt leak in tipc_rcv 2020-04-18 13:24:20 -07:00
node.h
socket.c tipc: Add a missing case of TIPC_DIRECT_MSG type 2020-03-26 11:21:02 -07:00
socket.h
subscr.c
subscr.h
sysctl.c
topsrv.c tipc: fix partial topology connection closure 2020-05-04 10:31:13 -07:00
topsrv.h
trace.c
trace.h
udp_media.c
udp_media.h