summaryrefslogtreecommitdiffstats
path: root/net/rxrpc/peer_event.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2018-10-15 23:37:21 +0200
committerDavid S. Miller <davem@davemloft.net>2018-10-16 08:13:42 +0200
commit1890fea7936ad9be0b7caf6a94146b0d905c4b60 (patch)
treef97ce997c4250d28edb65e9e77397ec00a161de1 /net/rxrpc/peer_event.c
parentsctp: use the pmtu from the icmp packet to update transport pathmtu (diff)
downloadlinux-1890fea7936ad9be0b7caf6a94146b0d905c4b60.tar.xz
linux-1890fea7936ad9be0b7caf6a94146b0d905c4b60.zip
rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler
Fix a missing call to rxrpc_put_peer() on the main path through the rxrpc_error_report() function. This manifests itself as a ref leak whenever an ICMP packet or other error comes in. In commit f334430316e7, the hand-off of the ref to a work item was removed and was not replaced with a put. Fixes: f334430316e7 ("rxrpc: Fix error distribution") Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/peer_event.c')
-rw-r--r--net/rxrpc/peer_event.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rxrpc/peer_event.c b/net/rxrpc/peer_event.c
index 05b51bdbdd41..bd2fa3b7caa7 100644
--- a/net/rxrpc/peer_event.c
+++ b/net/rxrpc/peer_event.c
@@ -195,6 +195,7 @@ void rxrpc_error_report(struct sock *sk)
rxrpc_store_error(peer, serr);
rcu_read_unlock();
rxrpc_free_skb(skb, rxrpc_skb_rx_freed);
+ rxrpc_put_peer(peer);
_leave("");
}