Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4595341pja; Thu, 21 Nov 2019 22:31:24 -0800 (PST) X-Google-Smtp-Source: APXvYqyBttkzqinWaRxtdLZsof9dFfqDESlD57u2Q5Exl9/go2x83DXWG83Jnhd6A9X6JygGdw84 X-Received: by 2002:a17:906:7251:: with SMTP id n17mr20237361ejk.329.1574404284091; Thu, 21 Nov 2019 22:31:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574404284; cv=none; d=google.com; s=arc-20160816; b=l0NIyIDu3/lB+/xsw8qWvktvOZPVlGllL+GgKj9T6Lbp1lc56U6FPTCz1efXywyyAR QxbvaDIM7cwBHkq06O+mzyCyJVM2QOvMgVe3RjxLahH4PQnbQGdRMdf3oEW2W2oX7C6l a9Yj5pkSkqVu87Egp3uGuo4X+dcmmdVsvm4haYhrBoYQ5i1uyqmqPDrQ8YfQTKSVB9cC DfEqbzv6JbZVE9UWnBC+jMFDs9PgM14V8cBkhyQ5nXzppaoUTTP3QhgsJlv/GNHCA7Lb WK07LQHyPEpGgAm6Dla8GpmwiSVfd+S2o8MCbRfysGJObxliRugzT0FZMiyHT/RNImdT UGhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+T5jdyxrnflKyZQv34iL5urS4yV3MovcOy/Ks3hXJxo=; b=h+YfKPTozSLRlTVsVu/QB0A/JOh8i10SOBwwgnFILPn0u4lEZfxoDXnJGzZlbCaRqX aGMkFN/V7SBFjCypE943tei+K/cYVBjyeAZGW5kfOuCtSBRIJHhxi6B4mRVhzfvL4sEA VFWczVgUtP/peo8wX6pHQ7e/MDpkt8sGNKndx9666xNaHTM8cT4Hf2tveX3v1/W470UY pVE76zq4UU9FxIXnWfyMiJbeg1wxAdWM/ZAeymF2lU+qlnUa4lrk6QW87OrTWDG7xlqA Q4ih5jDq13rQxHsVrb+b/vqRUVD6L4+23doTqZQ5VAb2+Er3ayRivtvX3HdDkZxlyNtx GBLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GxmPgbxB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si3682979ejp.400.2019.11.21.22.30.59; Thu, 21 Nov 2019 22:31:24 -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=@kernel.org header.s=default header.b=GxmPgbxB; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727344AbfKVG2p (ORCPT + 99 others); Fri, 22 Nov 2019 01:28:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:54520 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727511AbfKVFuH (ORCPT ); Fri, 22 Nov 2019 00:50:07 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DBA2920718; Fri, 22 Nov 2019 05:50:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401807; bh=Iv17XI1kZ8i57PKzy5lnBJCIm6Eq4Cz/eJFS8PDWT7c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxmPgbxBRBWp5A0/CqqS69CwtMDiYZmKYT3RCL9H7VHEIMam+mHqrzGVDxgxYqGi5 ffsYt+AAFV37B5VbdIPi2ZpwKvs9lskmD+v6LL1x3P5AtGkuqiCQT2AJXyn0ZiYDvr SjHaBAaHXvLxD39EnnfXcFS57XhIHZWwh8FRu0CM= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sagi Grimberg , Jens Axboe , Sasha Levin , linux-nvme@lists.infradead.org Subject: [PATCH AUTOSEL 4.19 052/219] nvme: fix kernel paging oops Date: Fri, 22 Nov 2019 00:46:24 -0500 Message-Id: <20191122054911.1750-45-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sagi Grimberg [ Upstream commit 092ff0520070fad8407b196f3bb6156ce77a6f98 ] free the controller discard_page correctly. Fixes: cb5b7262b011 ("nvme: provide fallback for discard alloc failure") Signed-off-by: Sagi Grimberg Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index ced70d37e0f9b..e9060317c1a7b 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3569,7 +3569,7 @@ static void nvme_free_ctrl(struct device *dev) ida_simple_remove(&nvme_instance_ida, ctrl->instance); kfree(ctrl->effects); nvme_mpath_uninit(ctrl); - kfree(ctrl->discard_page); + __free_page(ctrl->discard_page); if (subsys) { mutex_lock(&subsys->lock); -- 2.20.1