From patchwork Mon Nov 5 12:26:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Holmberg X-Patchwork-Id: 10668121 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 34A8E1709 for ; Mon, 5 Nov 2018 12:27:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 25A48294D0 for ; Mon, 5 Nov 2018 12:27:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 19E24294D9; Mon, 5 Nov 2018 12:27:06 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 C4F5E294D0 for ; Mon, 5 Nov 2018 12:27:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729827AbeKEVqc (ORCPT ); Mon, 5 Nov 2018 16:46:32 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:40139 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729658AbeKEVqV (ORCPT ); Mon, 5 Nov 2018 16:46:21 -0500 Received: by mail-ed1-f67.google.com with SMTP id a14-v6so3117708edr.7 for ; Mon, 05 Nov 2018 04:26:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owltronix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SBI5wmJR3GrCOuVAoVisL6o6BQzzsk47CQDsKZGf3JU=; b=yViJVCvIpa/MIRdTSmN11wUdmGX6zk7Twps88VA2eK5t0/IggmgRUUQ/C1Vt/iaVPg cTORBnBuR3dSXdu+emG6HozYCmBxWI67+IrMOss0tuimS6DE5BUteo1NGxE4WebtpCF0 kWE8sO6hUifRXuma8fEgBHVw+vz1pY4xcZEdNHmDnCnqoR13lqB07B+mlHvOnBMCTDp9 zL3BkMDGVZYpm/XMzAqCtn8ZG3CBMnM38sQnNxfTNH2R5iyjpXHh4YUT2fK9VXNZs+lY fuwWytEZI9TkfVKaXo3u5l8EPsUR0F/1OYI882ZvpUjHyhKf/kNYdFtBV8sRamHH6fQM aNyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SBI5wmJR3GrCOuVAoVisL6o6BQzzsk47CQDsKZGf3JU=; b=DqI1nMHmAvdiaEdoxHPPQRnXM5gDg5uxBh0Smpyildh5et+zsPWPoA3Em+OQbd8PUp FP5IRm9KCwbUkZGrZYomNMDniBnhGzvrVVMMMcJycaRCpu25KOQU01fMYFH9U0VgwIik zXNyC3i1TsJ8nXFldbXVr1/1x0Y1qlzXes1T43hkRj8HwMF7P97j0MNtPsBf3WdRatGW dc1LcPK9CHU9eDhlNnqzo1NFrRLdcaTzb25784SakVA7F6l3IcvPHpr6Pi5B1y4+9ib1 1tivuG9I7ZcmQd2TvTOHczzYVCsS/WJfqHPpRzpQOjQNlmaZ0dxjDte/XHXz0wkZxFSR 2YJw== X-Gm-Message-State: AGRZ1gKYys5ea0eaqlSC1SAvEitTNUJlsiB6P22xCk+PX74r4nzD1i+U z0NL8pNW5yRR3Z53YeoKAsULEA== X-Google-Smtp-Source: AJdET5cuRs3qouhWGwILRbVwzlGeUX6O4tzs5q87eYFWeeWF3hLt4heEFCwd3H5EjmCKGnIFJEb86w== X-Received: by 2002:a17:906:4e14:: with SMTP id z20-v6mr13554086eju.187.1541420809369; Mon, 05 Nov 2018 04:26:49 -0800 (PST) Received: from ch-lap-hans.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id 9-v6sm7046056ejw.46.2018.11.05.04.26.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 04:26:48 -0800 (PST) From: Hans Holmberg To: Matias Bjorling Cc: Javier Gonzales , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg Subject: [PATCH v2 6/7] lightnvm: pblk: fix pblk_lines_init error handling path Date: Mon, 5 Nov 2018 13:26:09 +0100 Message-Id: <20181105122610.1555-7-hans.ml.holmberg@owltronix.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181105122610.1555-1-hans.ml.holmberg@owltronix.com> References: <20181105122610.1555-1-hans.ml.holmberg@owltronix.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Holmberg The chunk metadata is allocated with vmalloc, so we need to use vfree to free it. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg --- drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 33c1e83327c3..ae9686b5d521 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -1053,7 +1053,7 @@ static int pblk_lines_init(struct pblk *pblk) pblk_line_meta_free(l_mg, &pblk->lines[i]); kfree(pblk->lines); fail_free_chunk_meta: - kfree(chunk_meta); + vfree(chunk_meta); fail_free_luns: kfree(pblk->luns); fail_free_meta: