]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler
authorDavid Howells <dhowells@redhat.com>
Mon, 15 Oct 2018 21:37:21 +0000 (22:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Oct 2018 06:13:42 +0000 (23:13 -0700)
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>
net/rxrpc/peer_event.c

index 05b51bdbdd41d0248d9b9c97dbcd9348277371a4..bd2fa3b7caa7e08ccec66979380f01423aca7f7b 100644 (file)
@@ -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("");
 }