linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Navid Emamdoost <navid.emamdoost@gmail.com>
To: Anna Schumaker <anna.schumaker@netapp.com>,
	Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Navid Emamdoost <emamd001@umn.edu>,
	Stephen McCamant <smccaman@umn.edu>, Kangjie Lu <kjlu@umn.edu>,
	linux-nfs@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] NFSv4: fix memory leak if nfs4_begin_drain_session fails
Date: Tue, 5 Nov 2019 23:37:22 -0600	[thread overview]
Message-ID: <CAEkB2EQ2BPpXcpRpN-+ErJD5Vkq6LiKONy8XQfvu0F1pO4weqw@mail.gmail.com> (raw)
In-Reply-To: <20190920002232.27477-1-navid.emamdoost@gmail.com>

Would you please review this patch?

On Thu, Sep 19, 2019 at 7:22 PM Navid Emamdoost
<navid.emamdoost@gmail.com> wrote:
>
> In nfs4_try_migration, if nfs4_begin_drain_session fails the allocated
> memory should be released.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> ---
>  fs/nfs/nfs4state.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index cad4e064b328..124649f12067 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -2096,7 +2096,7 @@ static int nfs4_try_migration(struct nfs_server *server, const struct cred *cred
>
>         status = nfs4_begin_drain_session(clp);
>         if (status != 0)
> -               return status;
> +               goto out;
>
>         status = nfs4_replace_transport(server, locations);
>         if (status != 0) {
> --
> 2.17.1
>


-- 
Navid.

  reply	other threads:[~2019-11-06  5:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20  0:22 [PATCH] NFSv4: fix memory leak if nfs4_begin_drain_session fails Navid Emamdoost
2019-11-06  5:37 ` Navid Emamdoost [this message]
2019-11-12 18:47   ` Schumaker, Anna

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=CAEkB2EQ2BPpXcpRpN-+ErJD5Vkq6LiKONy8XQfvu0F1pO4weqw@mail.gmail.com \
    --to=navid.emamdoost@gmail.com \
    --cc=anna.schumaker@netapp.com \
    --cc=emamd001@umn.edu \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=smccaman@umn.edu \
    --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;
as well as URLs for NNTP newsgroup(s).