* [PATCH] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
@ 2016-10-04 4:07 Trond Myklebust
2016-10-04 10:43 ` Jeff Layton
0 siblings, 1 reply; 2+ messages in thread
From: Trond Myklebust @ 2016-10-04 4:07 UTC (permalink / raw)
To: anna.schumaker; +Cc: Jeff Layton, linux-nfs
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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
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
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2016-10-04 10:43 UTC (permalink / raw)
To: Trond Myklebust, anna.schumaker; +Cc: linux-nfs
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-04 10:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).