From: "J. Bruce Fields" <bfields@fieldses.org>
To: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Cc: Jeff Layton <jlayton@poochiereds.net>,
linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: recover: fix memory leak
Date: Mon, 14 Mar 2016 14:46:21 -0400 [thread overview]
Message-ID: <20160314184621.GA20554@fieldses.org> (raw)
In-Reply-To: <1457345403-7195-1-git-send-email-sudipm.mukherjee@gmail.com>
On Mon, Mar 07, 2016 at 03:40:03PM +0530, Sudip Mukherjee wrote:
> nfsd4_cltrack_grace_start() will allocate the memory for grace_start but
> when we returned due to error we missed freeing it.
Thanks, applying for 4.6.--b.
>
> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> ---
> fs/nfsd/nfs4recover.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
> index 195fe26..66eaeb1 100644
> --- a/fs/nfsd/nfs4recover.c
> +++ b/fs/nfsd/nfs4recover.c
> @@ -1266,6 +1266,7 @@ nfsd4_umh_cltrack_init(struct net *net)
> /* XXX: The usermode helper s not working in container yet. */
> if (net != &init_net) {
> pr_warn("NFSD: attempt to initialize umh client tracking in a container ignored.\n");
> + kfree(grace_start);
> return -EINVAL;
> }
>
> --
> 1.9.1
prev parent reply other threads:[~2016-03-14 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-07 10:10 [PATCH] nfsd: recover: fix memory leak Sudip Mukherjee
2016-03-14 18:46 ` J. Bruce Fields [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=20160314184621.GA20554@fieldses.org \
--to=bfields@fieldses.org \
--cc=jlayton@poochiereds.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.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).