Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966350AbcJZM3U (ORCPT ); Wed, 26 Oct 2016 08:29:20 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:55447 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966323AbcJZM3N (ORCPT ); Wed, 26 Oct 2016 08:29:13 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jeff Layton , Trond Myklebust , Anna Schumaker Subject: [PATCH 4.8 081/140] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic Date: Wed, 26 Oct 2016 14:22:21 +0200 Message-Id: <20161026122223.841769037@linuxfoundation.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161026122220.384323763@linuxfoundation.org> References: <20161026122220.384323763@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 811 Lines: 30 4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jeff Layton commit 3f807e5ae5597bd65a6fff684083e8eaa21f3fa7 upstream. The caller of rpc_run_task also gets a reference that must be put. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Greg Kroah-Hartman --- fs/nfs/nfs42proc.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -443,6 +443,7 @@ int nfs42_proc_layoutstats_generic(struc task = rpc_run_task(&task_setup); if (IS_ERR(task)) return PTR_ERR(task); + rpc_put_task(task); return 0; }