From patchwork Tue Aug 1 20:25:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weston Andros Adamson X-Patchwork-Id: 9875449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 396A260390 for ; Tue, 1 Aug 2017 20:25:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E31C2873C for ; Tue, 1 Aug 2017 20:25:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2327628743; Tue, 1 Aug 2017 20:25:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3496D2874B for ; Tue, 1 Aug 2017 20:25:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbdHAUZW (ORCPT ); Tue, 1 Aug 2017 16:25:22 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:33657 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752025AbdHAUZV (ORCPT ); Tue, 1 Aug 2017 16:25:21 -0400 Received: by mail-it0-f66.google.com with SMTP id m34so2440350iti.0 for ; Tue, 01 Aug 2017 13:25:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=jfI8p3sIZJYaX+ZKIfVnQ9foz2B3kLOzUE3Ba30uQrU=; b=Gb6G66S9wy4zTcuhclNLCd/a1dOziyJoBD5aoWAM5bXBvEs6kMsu0Gx9nQV/26zYvM ZigVu++0XnUkXWvwZytuIb6ZIeqMDTjM7eQti1wOFFNhonO66Wu2PgFvb7tpd3JLoexx 2BG3/XQRfzxkG/CxZkZzvIS+pi2oiRt4VGok67A+x0p6OrfY9MypFjQ77Q0+uuJ8PpVl Fve3nNsUcgqAd6NAQL0brSJaa30BghXtT+qn8EJCLAhqeTFvgviTCYlGoqf+3L0jVkEh XugJT+rljhXsfoliVqS96XjWNak3WJmlpuxmcnKXXB5lnrCH2tbELn3ePL6iW7D07Tgd TTTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=jfI8p3sIZJYaX+ZKIfVnQ9foz2B3kLOzUE3Ba30uQrU=; b=rZuVyL9ztoxDCpXtdkUs5IyP9E0/KY/+M1Ctu24Ks8AoHqnQvpysI7+HojLV8PinTL hdj+ylpR4UjuwMWOqN01wAwMrVlssVObMTYpQclQMuanN4uA2LETYq+94YRZvj93FvGI yUnlSrhHZCJtZvJjDhV6/P4pUwFjP4AH2iDebnLe2ISr3FjIbw5OT1Hl7RU7q8Ns1iFX BH7WcIvaclhW2KtrwSYiaMlYWQf60bCEO3RVd1DTrQL8Vq1XMLf/+dm/eSE3E6uwdKgu 9vkwIFEGVrbBO0zxxztt+a+q9ivQV+tax3THyrGpSqxlR9hOKSzsnjeOqyol3IK24i4p I+9Q== X-Gm-Message-State: AIVw111q8NwimkzL01vKDA5YQbaRm78J4F1Q4JXHj3ri2/nQNZpjPfV3 h1r1ehoKM3qcwg== X-Received: by 10.36.130.131 with SMTP id t125mr2981178itd.99.1501619120604; Tue, 01 Aug 2017 13:25:20 -0700 (PDT) Received: from dhcp-51.robotsandstuff.fake (c-68-49-175-159.hsd1.mi.comcast.net. [68.49.175.159]) by smtp.gmail.com with ESMTPSA id n62sm2771270ion.46.2017.08.01.13.25.19 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 01 Aug 2017 13:25:20 -0700 (PDT) From: Weston Andros Adamson X-Google-Original-From: Weston Andros Adamson To: trond.myklebust@primarydata.com, anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org, Weston Andros Adamson Subject: [PATCH] nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays Date: Tue, 1 Aug 2017 16:25:01 -0400 Message-Id: <20170801202501.4876-1-dros@primarydata.com> X-Mailer: git-send-email 2.11.0 (Apple Git-81) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The client was freeing the nfs4_ff_layout_ds, but not the contained nfs4_ff_ds_version array. Signed-off-by: Weston Andros Adamson --- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c index 6df7a0cf5660..f32c58bbe556 100644 --- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c +++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c @@ -32,6 +32,7 @@ void nfs4_ff_layout_free_deviceid(struct nfs4_ff_layout_ds *mirror_ds) { nfs4_print_deviceid(&mirror_ds->id_node.deviceid); nfs4_pnfs_ds_put(mirror_ds->ds); + kfree(mirror_ds->ds_versions); kfree_rcu(mirror_ds, id_node.rcu); }