aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-03-06 14:40:17 +0100
committerDavid S. Miller <davem@davemloft.net>2014-03-06 14:46:23 -0500
commit4652edb70e8a7eebbe47fa931940f65522c36e8f (patch)
tree9e8da88878a1ec493a552cce5d59ecf0399499d9 /net/tipc/socket.c
parenttipc: allow connection shutdown callback to be invoked in advance (diff)
downloadlinux-dev-4652edb70e8a7eebbe47fa931940f65522c36e8f.tar.xz
linux-dev-4652edb70e8a7eebbe47fa931940f65522c36e8f.zip
tipc: fix connection refcount leak
When tipc_conn_sendmsg() calls tipc_conn_lookup() to query a connection instance, its reference count value is increased if it's found. But subsequently if it's found that the connection is closed, the work of sending message is not queued into its server send workqueue, and the connection reference count is not decreased. This will cause a reference count leak. To reproduce this problem, an application would need to open and closes topology server connections with high intensity. We fix this by immediately decrementing the connection reference count if a send fails due to the connection being closed. Signed-off-by: Ying Xue <ying.xue@windriver.com> Acked-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
0 files changed, 0 insertions, 0 deletions