All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Dionne <marc.dionne@auristor.com>
To: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
Cc: David Howells <dhowells@redhat.com>,
	David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	linux-afs@lists.infradead.org, netdev <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net 1/2] rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle()
Date: Tue, 23 Nov 2021 10:12:12 -0400	[thread overview]
Message-ID: <CAB9dFdtG9N_N=PKXaYwkpT5pvgSK1rTjNOGd4i6+hPcjr9hSHw@mail.gmail.com> (raw)
In-Reply-To: <20211121041608.133740-1-eiichi.tsukata@nutanix.com>

On Sun, Nov 21, 2021 at 12:17 AM Eiichi Tsukata
<eiichi.tsukata@nutanix.com> wrote:
>
> Need to call rxrpc_put_peer() for bundle candidate before kfree() as it
> holds a ref to rxrpc_peer.
>
> Fixes: 245500d853e9 ("rxrpc: Rewrite the client connection manager")
> Signed-off-by: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
> ---
>  net/rxrpc/conn_client.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/net/rxrpc/conn_client.c b/net/rxrpc/conn_client.c
> index dbea0bfee48e..46dcb33888ff 100644
> --- a/net/rxrpc/conn_client.c
> +++ b/net/rxrpc/conn_client.c
> @@ -328,6 +328,7 @@ static struct rxrpc_bundle *rxrpc_look_up_bundle(struct rxrpc_conn_parameters *c
>         return candidate;
>
>  found_bundle_free:
> +       rxrpc_put_peer(candidate->params.peer);
>         kfree(candidate);
>  found_bundle:
>         rxrpc_get_bundle(bundle);
> --
> 2.33.1

Reviewed-by: Marc Dionne <marc.dionne@auristor.com>

Marc

  parent reply	other threads:[~2021-11-23 14:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21  4:16 [PATCH net 1/2] rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle() Eiichi Tsukata
2021-11-21  4:16 ` [PATCH net 2/2] rxrpc: Fix rxrpc_local leak in rxrpc_lookup_peer() Eiichi Tsukata
2021-11-23 14:11   ` Marc Dionne
2021-11-23 14:12 ` Marc Dionne [this message]
2021-11-24 14:21 ` [PATCH net 1/2] rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle() David Howells
2021-11-29 15:49 [PATCH net 0/2] rxrpc: Leak fixes David Howells
2021-11-29 15:49 ` [PATCH net 1/2] rxrpc: Fix rxrpc_peer leak in rxrpc_look_up_bundle() David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAB9dFdtG9N_N=PKXaYwkpT5pvgSK1rTjNOGd4i6+hPcjr9hSHw@mail.gmail.com' \
    --to=marc.dionne@auristor.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=eiichi.tsukata@nutanix.com \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.