From patchwork Sat May 9 00:05:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 6368021 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A67B29F1C2 for ; Sat, 9 May 2015 00:05:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBF27202EC for ; Sat, 9 May 2015 00:05:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6EA7202FF for ; Sat, 9 May 2015 00:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753096AbbEIAFt (ORCPT ); Fri, 8 May 2015 20:05:49 -0400 Received: from mail-ie0-f180.google.com ([209.85.223.180]:35652 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753033AbbEIAFs (ORCPT ); Fri, 8 May 2015 20:05:48 -0400 Received: by ieczm2 with SMTP id zm2so75215504iec.2 for ; Fri, 08 May 2015 17:05:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=NOANhKYHBM9GYDlyQ+gsHL0uupb7+WE/gNM3QKk5QgI=; b=TY8rG4+GS11TPUj1dEz1v3gEuJnuy2izvFdZk6AtkfUHi1Gu5wSlEAFY9JsnJB6pFW pcZUiZFhv6h4xSoGGoDB8GZjvi4XS/qVvFC5epkrti97gyhDL4qkcdE4mmaCK9hZI2B6 xjsxG015a4VoCHAAIXz3brb+mHClpnzDKrGIZnkcPu2pdy0yxZv3GYDVcq+bYuO9q9i/ NWITNQS6Un6MQUUHWaH/0j1WUyQzKTnWeikVryRKOJMqA4diHzoM7dmtR+cAUuIgc7By gMaMxQIikx4G54HRPNiRrAHcXMKDEfu1GppKPHITuYAS10/okWC8c9eRC+wvR19+L/P3 656Q== X-Gm-Message-State: ALoCoQkVTkDYAx1tGWmYGK6D8aLVMwFNIaiQ+UnhF0PdyY4n8xrOP0ordPdFvGXX0vao8xhWU8Zp X-Received: by 10.42.52.4 with SMTP id h4mr710805icg.32.1431129947575; Fri, 08 May 2015 17:05:47 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1301:401d:3aca:e112:152b]) by mx.google.com with ESMTPSA id j4sm633293igo.0.2015.05.08.17.05.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 08 May 2015 17:05:47 -0700 (PDT) Date: Fri, 8 May 2015 17:05:44 -0700 From: Dmitry Torokhov To: Joerg Roedel , Kukjin Kim Cc: Shaik Ameer Basha , Cho KyongHo , Colin Cross , Doug Anderson , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] iommu: exynos: tell kmemleak to ignore 2nd level page tables Message-ID: <20150509000544.GA29904@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Cross The pointers to the 2nd level page tables are converted to 1st level page table entries, which means kmemleak can't find them and assumes they have been leaked. Call kmemleak_ignore on the 2nd level page tables to prevent them from showing up in kmemleak reports. Signed-off-by: Colin Cross Signed-off-by: Dmitry Torokhov --- drivers/iommu/exynos-iommu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index dc14fec4..16920b2 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -855,6 +855,7 @@ static sysmmu_pte_t *alloc_lv2entry(struct exynos_iommu_domain *priv, return ERR_PTR(-ENOMEM); *sent = mk_lv1ent_page(virt_to_phys(pent)); + kmemleak_ignore(pent); *pgcounter = NUM_LV2ENTRIES; pgtable_flush(pent, pent + NUM_LV2ENTRIES); pgtable_flush(sent, sent + 1);