From patchwork Thu Oct 6 22:21:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9365385 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 745D96075E for ; Thu, 6 Oct 2016 22:21:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5014829233 for ; Thu, 6 Oct 2016 22:21:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 409442926F; Thu, 6 Oct 2016 22:21:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE9429233 for ; Thu, 6 Oct 2016 22:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753175AbcJFWVh (ORCPT ); Thu, 6 Oct 2016 18:21:37 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:41217 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318AbcJFWVg (ORCPT ); Thu, 6 Oct 2016 18:21:36 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6B853618BE; Thu, 6 Oct 2016 22:21:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1475792495; bh=MsaViBZeZAt4ViiFYj/6RsEkJHp7NZZWV+MpSyfYMp0=; h=From:To:Cc:Subject:Date:From; b=anKxe+uZJs6lhlwyLMi28KmYfaH58inffGJ6J9/UaviTAI6Vt8RqycIMX2ohOZfix 2eMQXN9GNzKlsRPNSMtwucnYhSCOIifFmnCSMRRh8efrvIt/81L2udhxst9qcO2jq5 Qk5iLUP6OENUQi4NyKf5QTWGDOJLUlDGnLT1FNWE= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2BC1861779; Thu, 6 Oct 2016 22:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1475792495; bh=MsaViBZeZAt4ViiFYj/6RsEkJHp7NZZWV+MpSyfYMp0=; h=From:To:Cc:Subject:Date:From; b=anKxe+uZJs6lhlwyLMi28KmYfaH58inffGJ6J9/UaviTAI6Vt8RqycIMX2ohOZfix 2eMQXN9GNzKlsRPNSMtwucnYhSCOIifFmnCSMRRh8efrvIt/81L2udhxst9qcO2jq5 Qk5iLUP6OENUQi4NyKf5QTWGDOJLUlDGnLT1FNWE= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 2BC1861779 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: dmaengine@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , linux-kernel@vger.kernel.org Subject: [PATCH] dmaengine: qcom_hidma: remove useless debugfs file removal Date: Thu, 6 Oct 2016 18:21:29 -0400 Message-Id: <1475792489-1415-1-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since 'commit acc29fb8f792 ("debugfs: ->d_parent is never NULL or negative")', HIDMA object removal is no longer working. This is due to redundant debugfs remove call in hidma_debug_uninit. debugfs_remove_recursive(dmadev->debugfs); debugfs_remove_recursive(dmadev->stats); The first remove is for the directory. Second remove is for the file under the directory. The directory remove makes file remove invalid. Unable to handle kernel NULL pointer dereference at virtual address [] down_write+0x18/0x68 [] debugfs_remove_recursive+0x50/0x1c0 [] hidma_debug_uninit+0x20/0x30 [] hidma_remove+0x48/0x98 [] platform_drv_remove+0x24/0x68 [] __device_release_driver+0x80/0x118 [] device_release_driver+0x24/0x38 [] unbind_store+0xe8/0x110 [] drv_attr_store+0x20/0x30 [] sysfs_kf_write+0x48/0x58 [] kernfs_fop_write+0xb0/0x1d8 [] __vfs_write+0x1c/0x110 [] vfs_write+0xa0/0x1b8 [] SyS_write+0x44/0xa0 [] el0_svc_naked+0x24/0x28 Removing the second line. Signed-off-by: Sinan Kaya --- drivers/dma/qcom/hidma_dbg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/qcom/hidma_dbg.c b/drivers/dma/qcom/hidma_dbg.c index 87db285..3bdcb80 100644 --- a/drivers/dma/qcom/hidma_dbg.c +++ b/drivers/dma/qcom/hidma_dbg.c @@ -165,7 +165,6 @@ static int hidma_dma_info_open(struct inode *inode, struct file *file) void hidma_debug_uninit(struct hidma_dev *dmadev) { debugfs_remove_recursive(dmadev->debugfs); - debugfs_remove_recursive(dmadev->stats); } int hidma_debug_init(struct hidma_dev *dmadev)