Skip to content

Commit

Permalink
rxrpc: Fix a missing rxrpc_put_peer() in the error_report handler
Browse files Browse the repository at this point in the history
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 f334430, the hand-off of the ref to a work item was removed
and was not replaced with a put.

Fixes: f334430 ("rxrpc: Fix error distribution")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Howells authored and David S. Miller committed Oct 16, 2018
1 parent d805397 commit 1890fea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/rxrpc/peer_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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("");
}
Expand Down

0 comments on commit 1890fea

Please sign in to comment.