netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Gaosheng Cui <cuigaosheng1@huawei.com>
Cc: dhowells@redhat.com, marc.dionne@auristor.com,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, linux-afs@lists.infradead.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH -next] rxrpc: Fix the error handling path in rxkad_init_connection_security
Date: Tue, 9 Jul 2024 18:58:34 +0100	[thread overview]
Message-ID: <20240709175834.GN346094@kernel.org> (raw)
In-Reply-To: <20240709104910.3397496-1-cuigaosheng1@huawei.com>

On Tue, Jul 09, 2024 at 06:49:10PM +0800, Gaosheng Cui wrote:
> If security_level of rxrpc_connection is invalid, ci should be freed
> by crypto_free_sync_skcipher, replace error with error_ci to fix the
> memory leak.
> 
> Fixes: 17926a79320a ("[AF_RXRPC]: Provide secure RxRPC sockets for use by userspace and kernel both")
> Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>

Reviewed-by: Simon Horman <horms@kernel.org>

As an aside, the BUG() in the middle of rxkad_init_connection_security()
is a bit of a surprise.

      reply	other threads:[~2024-07-09 17:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-09 10:49 [PATCH -next] rxrpc: Fix the error handling path in rxkad_init_connection_security Gaosheng Cui
2024-07-09 17:58 ` Simon Horman [this message]

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=20240709175834.GN346094@kernel.org \
    --to=horms@kernel.org \
    --cc=cuigaosheng1@huawei.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=marc.dionne@auristor.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 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).