Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1016759yba; Thu, 4 Apr 2019 02:30:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjqL86y74wkWC2K8zCDh1fZ7lcg6R+jdlQwMzM1moq0t7+mZ1HgYK+wtJ57EICpZikGIZL X-Received: by 2002:a63:ed4e:: with SMTP id m14mr4888056pgk.182.1554370236235; Thu, 04 Apr 2019 02:30:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554370236; cv=none; d=google.com; s=arc-20160816; b=Up3bNgggErZMdlPDzBVAwgVzRWNayJPqC2Rvz8aLPJCahnVJPzIx1AYOxOjTe57TQ+ hBK2jM66pY39oe1J2g1unSrjeLJ+RLNGS33RSMnfcW9pyKAvp0hB9TTc6pCZRzWXdjkk ko2R+ohsXJV7C5o040JqQrtRRRA1SEceJ1gvxZyI+ySr7u/aWzAH01jqoEun8dwyKXyP IpruhkDEYLaHsZ4lpYTabpV2NDqzlqy+bOeyTUod3/SaDJ0leB0S/3DNb7nhC3nj+vkp L72s9N17+hNg/trUX/QyxZi7aLkoprZ0FVsERsZvMxY4TDGpVyYSdVnFJQJFQtp9gKhn 4ynA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hkFG4FebwPDFFohkmK3AmgzkG/5M7a6UIA4+HR48RQI=; b=U/OrbL2s6tgE023WZGCv/sT/GXQZGtkUst7q19wpuxfGJu9aCuIn3TozUhmIHQUjCW 2joPE3FvzPpv5WleQeNynJ10GwOElzB2CZ0jb3qYUPiy2l1rsWvT/QdbkkBVNgRy5Qq6 ZpkEHMfFZnrY20SW+bGVKrasqwRjJ0ApJRMw2/wGnYe/Aakuz8/SI2+ZAKzvUxG3tju6 0Ol2rwG3cOC07ONcbbtWP/0Beygdk+CAwxfVMakZOURpFmpq71Z898yGM37o7V3yoPTM R84CVVqigv15xZw3CQn/uiyA/eqEtiyWs/kBsOEL7cVAwAh8cwTuGvr1y2vMIyqt1bnp qLGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RTTc+cy1; 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 k11si16163704pga.257.2019.04.04.02.30.20; Thu, 04 Apr 2019 02:30:36 -0700 (PDT) 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=RTTc+cy1; 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 S1733075AbfDDJKx (ORCPT + 99 others); Thu, 4 Apr 2019 05:10:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:50626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733071AbfDDJKv (ORCPT ); Thu, 4 Apr 2019 05:10:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BDCEA214AF; Thu, 4 Apr 2019 09:10:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554369050; bh=nvJKgbIxYAddPBMwadOx06lQN0BMl7l85LqwoAEXQt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RTTc+cy1j1r0Fy4ow3mRDreJ2Bezn4zTD8/PMbheFdzdD2895VsuVz0igPl4E8YHu gLtWtodU7actS7oQcI2n65PBOGpGZJ0Vx9oaWUnjlBUlBpjmisHvsiBcIjpMFnb1oc RHQJZ9Fz5yxUDISBDXnEfgWMXcGwVOUzcvM0L/R0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Boichat , Will Deacon , Joerg Roedel , Sasha Levin Subject: [PATCH 5.0 079/246] iommu/io-pgtable-arm-v7s: Only kmemleak_ignore L2 tables Date: Thu, 4 Apr 2019 10:46:19 +0200 Message-Id: <20190404084621.900362467@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084619.236418459@linuxfoundation.org> References: <20190404084619.236418459@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 5.0-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 032ebd8548c9d05e8d2bdc7a7ec2fe29454b0ad0 ] L1 tables are allocated with __get_dma_pages, and therefore already ignored by kmemleak. Without this, the kernel would print this error message on boot, when the first L1 table is allocated: [ 2.810533] kmemleak: Trying to color unknown object at 0xffffffd652388000 as Black [ 2.818190] CPU: 5 PID: 39 Comm: kworker/5:0 Tainted: G S 4.19.16 #8 [ 2.831227] Workqueue: events deferred_probe_work_func [ 2.836353] Call trace: ... [ 2.852532] paint_ptr+0xa0/0xa8 [ 2.855750] kmemleak_ignore+0x38/0x6c [ 2.859490] __arm_v7s_alloc_table+0x168/0x1f4 [ 2.863922] arm_v7s_alloc_pgtable+0x114/0x17c [ 2.868354] alloc_io_pgtable_ops+0x3c/0x78 ... Fixes: e5fc9753b1a8314 ("iommu/io-pgtable: Add ARMv7 short descriptor support") Signed-off-by: Nicolas Boichat Acked-by: Will Deacon Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin --- drivers/iommu/io-pgtable-arm-v7s.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/io-pgtable-arm-v7s.c b/drivers/iommu/io-pgtable-arm-v7s.c index 1b9e40a203e0..18a8330e1882 100644 --- a/drivers/iommu/io-pgtable-arm-v7s.c +++ b/drivers/iommu/io-pgtable-arm-v7s.c @@ -228,7 +228,8 @@ static void *__arm_v7s_alloc_table(int lvl, gfp_t gfp, if (dma != phys) goto out_unmap; } - kmemleak_ignore(table); + if (lvl == 2) + kmemleak_ignore(table); return table; out_unmap: -- 2.19.1