linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@poochiereds.net>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
Date: Tue, 04 Oct 2016 06:43:45 -0400	[thread overview]
Message-ID: <1475577825.2645.1.camel@poochiereds.net> (raw)
In-Reply-To: <1475554063-8219-1-git-send-email-trond.myklebust@primarydata.com>

On Tue, 2016-10-04 at 00:07 -0400, Trond Myklebust wrote:
> From: Jeff Layton <jlayton@poochiereds.net>
> 
> The caller of rpc_run_task also gets a reference that must be put.
> 
> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
> Cc: stable@vger.kernel.org # 4.2+
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
> ---
>  fs/nfs/nfs42proc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c
> index 64b43b4ad9dd..608501971fe0 100644
> --- a/fs/nfs/nfs42proc.c
> +++ b/fs/nfs/nfs42proc.c
> @@ -443,6 +443,7 @@ int nfs42_proc_layoutstats_generic(struct nfs_server *server,
>  	task = rpc_run_task(&task_setup);
>  	if (IS_ERR(task))
>  		return PTR_ERR(task);
> +	rpc_put_task(task);
>  	return 0;
>  }
>  

Ouch, good catch. I thought I had sent this upstream long ago, but I
guess it slipped through the cracks.

Thanks,
-- 
Jeff Layton <jlayton@poochiereds.net>

      reply	other threads:[~2016-10-04 10:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-04  4:07 [PATCH] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic Trond Myklebust
2016-10-04 10:43 ` Jeff Layton [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=1475577825.2645.1.camel@poochiereds.net \
    --to=jlayton@poochiereds.net \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.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).