Message ID | 161183091692.3506637.3206605651502458810.stgit@warthog.procyon.org.uk |
---|---|
State | New |
Headers | show |
Series | [net] rxrpc: Fix memory leak in rxrpc_lookup_local | expand |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Thu, 28 Jan 2021 10:48:36 +0000 you wrote: > From: Takeshi Misawa <jeliantsurux@gmail.com> > > Commit 9ebeddef58c4 ("rxrpc: rxrpc_peer needs to hold a ref on the rxrpc_local record") > Then release ref in __rxrpc_put_peer and rxrpc_put_peer_locked. > > struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp) > - peer->local = local; > + peer->local = rxrpc_get_local(local); > > [...] Here is the summary with links: - [net] rxrpc: Fix memory leak in rxrpc_lookup_local https://git.kernel.org/netdev/net/c/b8323f7288ab You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/rxrpc/call_accept.c b/net/rxrpc/call_accept.c index 382add72c66f..1ae90fb97936 100644 --- a/net/rxrpc/call_accept.c +++ b/net/rxrpc/call_accept.c @@ -197,6 +197,7 @@ void rxrpc_discard_prealloc(struct rxrpc_sock *rx) tail = b->peer_backlog_tail; while (CIRC_CNT(head, tail, size) > 0) { struct rxrpc_peer *peer = b->peer_backlog[tail]; + rxrpc_put_local(peer->local); kfree(peer); tail = (tail + 1) & (size - 1); }