mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Simon Horman <horms@kernel.org>, Zhipeng Lu <alexious@zju.edu.cn>
Cc: Jeff Layton <jlayton@kernel.org>, Neil Brown <neilb@suse.de>,
	Olga Kornievskaia <kolga@netapp.com>,
	Dai Ngo <dai.ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>,
	Anna Schumaker <anna@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simo Sorce <simo@redhat.com>, Steve Dickson <steved@redhat.com>,
	Kevin Coffman <kwc@citi.umich.edu>,
	Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
	"open list:NETWORKING [GENERAL]" <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] [v2] SUNRPC: fix a memleak in gss_import_v2_context
Date: Mon, 15 Jan 2024 14:23:19 +0000	[thread overview]
Message-ID: <35F4C7FB-3337-4894-8AA2-C1F4ADCD99C9@oracle.com> (raw)
In-Reply-To: <20240115110905.GR392144@kernel.org>



> On Jan 15, 2024, at 6:09 AM, Simon Horman <horms@kernel.org> wrote:
> 
> On Fri, Jan 12, 2024 at 04:45:38PM +0800, Zhipeng Lu wrote:
>> The ctx->mech_used.data allocated by kmemdup is not freed in neither
>> gss_import_v2_context nor it only caller radeon_driver_open_kms.
> 
> Should radeon_driver_open_kms be gss_krb5_import_sec_context?
> 
> Also, perhaps it is useful to write something like this:
> 
> ... gss_krb5_import_sec_context, which frees ctx on error.

If Zhipeng agrees to this suggestion, I can change the
patch description in my tree. A v3 is not necessary.


>> Thus, this patch reform the last call of gss_import_v2_context to the
>> gss_krb5_import_ctx_v2, preventing the memleak while keepping the return
>> formation.
>> 
>> Fixes: 47d848077629 ("gss_krb5: handle new context format from gssd")
>> Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
> 
> Hi Zhipeng Lu,
> 
> Other than the comment above, I agree with your analysis.
> And that although the problem has changed form slightly,
> it was originally introduced by the cited commit.
> I also agree that your fix.
> 
> ...

--
Chuck Lever



  reply	other threads:[~2024-01-15 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  8:45 Zhipeng Lu
2024-01-12 13:23 ` Jeff Layton
2024-01-12 19:24 ` Jakub Kicinski
2024-01-12 19:27   ` Chuck Lever III
2024-01-12 20:01     ` Jakub Kicinski
2024-01-15 11:09 ` Simon Horman
2024-01-15 14:23   ` Chuck Lever III [this message]
2024-01-17  7:44     ` alexious

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=35F4C7FB-3337-4894-8AA2-C1F4ADCD99C9@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=alexious@zju.edu.cn \
    --cc=anna@kernel.org \
    --cc=dai.ngo@oracle.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=kolga@netapp.com \
    --cc=kuba@kernel.org \
    --cc=kwc@citi.umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=simo@redhat.com \
    --cc=steved@redhat.com \
    --cc=tom@talpey.com \
    --cc=trond.myklebust@hammerspace.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

all inboxes | Powered by JetHome®