From patchwork Mon Apr 4 22:46:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 65031 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp137522lbc; Mon, 4 Apr 2016 15:46:35 -0700 (PDT) X-Received: by 10.98.70.67 with SMTP id t64mr24410914pfa.110.1459809995234; Mon, 04 Apr 2016 15:46:35 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si3172033pat.66.2016.04.04.15.46.35; Mon, 04 Apr 2016 15:46:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbcDDWqa (ORCPT + 3 others); Mon, 4 Apr 2016 18:46:30 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:39394 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753657AbcDDWq3 (ORCPT ); Mon, 4 Apr 2016 18:46:29 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u34MkNku004424; Mon, 4 Apr 2016 17:46:23 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u34MkNUv011524; Mon, 4 Apr 2016 17:46:23 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Mon, 4 Apr 2016 17:46:23 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u34MkNlK025079; Mon, 4 Apr 2016 17:46:23 -0500 Received: from localhost (irmo.am.dhcp.ti.com [128.247.83.68]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id u34MkN910401; Mon, 4 Apr 2016 17:46:23 -0500 (CDT) From: Suman Anna To: Joerg Roedel CC: , , Suman Anna Subject: [PATCH 1/4] iommu/omap: Remove iopgtable_clear_entry_all() from driver remove Date: Mon, 4 Apr 2016 17:46:18 -0500 Message-ID: <1459809981-37984-2-git-send-email-s-anna@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1459809981-37984-1-git-send-email-s-anna@ti.com> References: <1459809981-37984-1-git-send-email-s-anna@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The function iopgtable_clear_entry_all() is used for clearing all the page table entries. These entries are neither created nor initialized during the OMAP IOMMU driver probe, and are managed only when a client device attaches to the IOMMU. So, there is no need to invoke this function on a driver remove. Removing this fixes a NULL pointer dereference crash if the IOMMU device is unbound from the driver with no client device attached to the IOMMU device. Signed-off-by: Suman Anna --- drivers/iommu/omap-iommu.c | 1 - 1 file changed, 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 3dc5b65f3990..c05d48f88596 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -987,7 +987,6 @@ static int omap_iommu_remove(struct platform_device *pdev) { struct omap_iommu *obj = platform_get_drvdata(pdev); - iopgtable_clear_entry_all(obj); omap_iommu_debugfs_remove(obj); pm_runtime_disable(obj->dev);