Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7218514imu; Tue, 22 Jan 2019 02:19:48 -0800 (PST) X-Google-Smtp-Source: ALg8bN7yzzZuXoDzkbIo20YBSH5PpCVeryAr0E2U5XPeefdD2t/YWfLxyXBRyEDD75FDnqSiVEi5 X-Received: by 2002:a63:6f0d:: with SMTP id k13mr31196589pgc.42.1548152388889; Tue, 22 Jan 2019 02:19:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548152388; cv=none; d=google.com; s=arc-20160816; b=PptFFUit9jQiL4To23xffmNyt+VsXZQv+x9u3/XEnclq4wcwToTXLw3coOMDUUVOBo tUPrrInsEiBtToxr88PnLLWpFZlYDslnQOIR+zX1wYF9NpEXS0TTnJp97g1Fn7+Uzixd NZz4Q89ZJS9RjheKAZDKcxhK2LXANhgR/r9xqmL7JXAiQGZs5QbpsymSuRhhMSL5w6s6 hOXWG7pp8I0z9lWspgioIEfZ2pY5nMTTJ4q+K+LI5u82s33AsmGMvGMshJ6dM4VL5pi2 betCABGopSPh+iHkPEE5VysJ/38u118qqqOor18hQM89k4zDcL2ePboS+3GI6iE77XEs W5TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=F14VHg3Q6CcoagSvNNNrRfEviAiUaeLFCtdR36qYta8=; b=wtj0AIsu3lqfGlF48wdwwSz3VI1Vt1vL/f8u9F+gyY5IjreZWPp+kfpGOWIJn6vqgU HLM36/KgahSazopKSx0l2DSj+fgbd9q7943yiin0WK5A6xyW8gglzKHq2cmojKL7GRts lkgIDYtnlL0uRjo3tkchXXFhH+zFm+9mAE8x75SYkrCQ7fFW4+7MHyFvoLkn6yQmPm+V KczyGtGSXIPpgHlg6Yk094RMVFgA6PrY30IIrLgIsrI3smI74Re9+8f8yU7c7u5gZobQ aBBpWwKBVAZqcBvmAihT7dCE2brlRNGyrSiL3hNQKqY4mQJR5Mh5ZZyVmD5NFEIBlM8k mRtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=f2VVGDA1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 20si53025pft.177.2019.01.22.02.19.33; Tue, 22 Jan 2019 02:19:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=f2VVGDA1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728138AbfAVKSS (ORCPT + 99 others); Tue, 22 Jan 2019 05:18:18 -0500 Received: from mail-it1-f195.google.com ([209.85.166.195]:37354 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727544AbfAVKSQ (ORCPT ); Tue, 22 Jan 2019 05:18:16 -0500 Received: by mail-it1-f195.google.com with SMTP id b5so19338522iti.2 for ; Tue, 22 Jan 2019 02:18:16 -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; bh=F14VHg3Q6CcoagSvNNNrRfEviAiUaeLFCtdR36qYta8=; b=f2VVGDA1hSd/nJ6UptoYZXAWbwxFmQdq+WakgpQ0iTAqmZkMSHkqup6lTjcQsty5UF a2+wIU5cCe9jU2y05niFdZQznFlIhKDqzqvZvM/2oRzHBdtrLPsZVSOjwiARElRSAa8F ag7uhVTXp/xgyt/psPZQd8ZKRZLEjFHJtjHjluEwXyeI/CPrjcLiRDmssaWLMzKzc4du 5YFeshWpL4xy7EoGwmBdDkHAOerXxbaRUpJQF1nXvSyZNyrTuH/FkeI4z36RgUFAkZfX D4kSlz9m376vBv7WymCmaAQ1vpDZ7LaY3+Q6K53Yte3a7t6AYE7m0+mj73BKQxyPZrI8 hrOQ== 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; bh=F14VHg3Q6CcoagSvNNNrRfEviAiUaeLFCtdR36qYta8=; b=WbC9uNKRCv+3lEtQEWLetgr5mX+MrcvoVr1AQJBkQD1//bkd3LsTuZwYFS4RjnBThj 7voCMNS3GGioR4WRzWf+Xq1NSL8g14bJA91t5MresQ4nbXl/4HTrWPuwYYiCt4qEV22T j6ggvvh/gtKn6sRf6PZVxE7yjompdzwvxnJp4MeuXwvCzmXppwdOM+NlRxeZKTn1S3W9 w7PKCZADBcrUI3C23/cRHvOVesj5vUcO3PoewVCBNqaEM1UusZtf4AumrhQ6VWYrM5/+ /Yh2CATwlxYcba5QgZBIbe9+XtwFSOlEqZXOniSD30jSlN6hyUYzGDMFU9Y8d4Doevji RGjA== X-Gm-Message-State: AJcUukd+3JVA5ogWhGcnmW7APuJ+mC7CSsueo9l7wo1ozXF15P5FSbQS ArwI9YIhAMv3lv5eDvpJTzQyFw== X-Received: by 2002:a24:7c58:: with SMTP id a85mr1775263itd.9.1548152295522; Tue, 22 Jan 2019 02:18:15 -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 18sm7595496itk.28.2019.01.22.02.18.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 02:18:15 -0800 (PST) From: hans@owltronix.com To: Matias Bjorling Cc: javier@javigon.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg Subject: [PATCH] lightnvm: pblk: use vfree to free metadata on error path Date: Tue, 22 Jan 2019 11:17:59 +0100 Message-Id: <20190122101759.31201-1-hans@owltronix.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Holmberg As chunk metadata is allocated using vmalloc, we need to free it using vfree. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg --- drivers/lightnvm/pblk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index 1ff165351180..1b5ff51faa63 100644 --- a/drivers/lightnvm/pblk-core.c +++ b/drivers/lightnvm/pblk-core.c @@ -141,7 +141,7 @@ struct nvm_chk_meta *pblk_get_chunk_meta(struct pblk *pblk) ret = nvm_get_chunk_meta(dev, ppa, geo->all_chunks, meta); if (ret) { - kfree(meta); + vfree(meta); return ERR_PTR(-EIO); } -- 2.17.1