From patchwork Thu Jul 16 01:01:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 496079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3E9E71401DA; Thu, 16 Jul 2015 11:02:32 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZFXZE-0003Sg-8I; Thu, 16 Jul 2015 01:02:28 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtp (Exim 4.76) (envelope-from ) id 1ZFXY1-0002jz-4g for kernel-team@lists.ubuntu.com; Thu, 16 Jul 2015 01:01:13 +0000 Received: from 1.general.kamal.us.vpn ([10.172.68.52] helo=fourier) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1ZFXY0-00069l-Ub; Thu, 16 Jul 2015 01:01:13 +0000 Received: from kamal by fourier with local (Exim 4.82) (envelope-from ) id 1ZFXXy-0000oY-Nq; Wed, 15 Jul 2015 18:01:10 -0700 From: Kamal Mostafa To: Trond Myklebust Subject: [3.19.y-ckt stable] Patch "pNFS: Fix a memory leak when attempted pnfs fails" has been added to staging queue Date: Wed, 15 Jul 2015 18:01:10 -0700 Message-Id: <1437008470-3100-1-git-send-email-kamal@canonical.com> X-Mailer: git-send-email 1.9.1 X-Extended-Stable: 3.19 Cc: Kamal Mostafa , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: kernel-team-bounces@lists.ubuntu.com This is a note to let you know that I have just added a patch titled pNFS: Fix a memory leak when attempted pnfs fails to the linux-3.19.y-queue branch of the 3.19.y-ckt extended stable tree which can be found at: http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-queue This patch is scheduled to be released in version 3.19.y-ckt4. If you, or anyone else, feels it should not be added to this tree, please reply to this email. For more information about the 3.19.y-ckt tree, see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable Thanks. -Kamal ------ From 4cba235515cdab70df2e2b233dc8193f20f74067 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 17 Jun 2015 19:41:51 -0400 Subject: pNFS: Fix a memory leak when attempted pnfs fails commit 1ca018d28d96d07788474abf66a5f3e9594841f5 upstream. pnfs_do_write() expects the call to pnfs_write_through_mds() to free the pgio header and to release the layout segment before exiting. The problem is that nfs_pgio_data_destroy() doesn't actually do this; it only frees the memory allocated by nfs_generic_pgio(). Ditto for pnfs_do_read()... Fix in both cases is to add a call to hdr->release(hdr). Signed-off-by: Trond Myklebust Signed-off-by: Kamal Mostafa --- fs/nfs/pnfs.c | 2 ++ 1 file changed, 2 insertions(+) -- 1.9.1 diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c index 883ee88..2b39287 100644 --- a/fs/nfs/pnfs.c +++ b/fs/nfs/pnfs.c @@ -1576,6 +1576,7 @@ pnfs_write_through_mds(struct nfs_pageio_descriptor *desc, desc->pg_recoalesce = 1; } nfs_pgio_data_destroy(hdr); + hdr->release(hdr); } static enum pnfs_try_status @@ -1692,6 +1693,7 @@ pnfs_read_through_mds(struct nfs_pageio_descriptor *desc, desc->pg_recoalesce = 1; } nfs_pgio_data_destroy(hdr); + hdr->release(hdr); } /*