* [PATCH net] rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler
@ 2018-10-15 21:37 David Howells
2018-10-16 6:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2018-10-15 21:37 UTC (permalink / raw)
To: netdev; +Cc: dhowells, linux-afs, linux-kernel
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>
---
net/rxrpc/peer_event.c | 1 +
1 file changed, 1 insertion(+)
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("");
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler
2018-10-15 21:37 [PATCH net] rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler David Howells
@ 2018-10-16 6:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-10-16 6:14 UTC (permalink / raw)
To: dhowells; +Cc: netdev, linux-afs, linux-kernel
From: David Howells <dhowells@redhat.com>
Date: Mon, 15 Oct 2018 22:37:21 +0100
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-16 6:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 21:37 [PATCH net] rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler David Howells
2018-10-16 6:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).