Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6821702pxb; Wed, 17 Feb 2021 14:38:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJweq0CyuOS3a2qge2RkIqBLhd+nY6ue49izf7I9NqFkrGNU15ySM1Eb5I6NDsltfk62vBot X-Received: by 2002:a17:906:68e:: with SMTP id u14mr1073524ejb.380.1613601483323; Wed, 17 Feb 2021 14:38:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613601483; cv=none; d=google.com; s=arc-20160816; b=zgsRKm1QSIHsSgTEfhEh9OZRVbPRAkwzAYlleGapZSNo9zvGq4LQni1iqHDR6oRWFh BJC76wHHTifYRRkgrlYAQpUffGV7Rht6xPgq7F2Pe5NJFZIHPyLW1Cvq2VrzG2V17ywP jcWSOOxjItTMBkhfKafZtHr5QmROMv+GLBCZY18Hqc7JPtvbbZuL1UfyxcfyW4iajkFH NxtT6gbMXFgCFHfYcCSxsyxuOt/bEvoP12EzgODmJfqo5GnBtgUrzyYh+ZX/0zZjLw61 ZKI+THb6f3d4Dz/oS6qBFEUAJuEM7fVBpLUHVqmtYUHUM0zPrTOfg14Oza878FsyaEpg +SQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=MUhr1niuS+nIf8yyOL3EK0hH/D5TYRo+abH0t2xXTCg=; b=rngBUG7hh1csWj9qxFfYGZoaaTzDAXr/v9alXmk49picRiKbGq2w10D9XHGQKK3tnt JKyhF7Jfj2223TVH3k8iRaoURSz3p2kGiJL8XWOD/ziOOpXDksq1tEShyR20ys4H2VYh 3lkQkbAOXtGwJKs3zAUdu+qeB1zPgciN3AKqxYuVS8lvX7BdP8kwIVjavPoCjWgUnMjF Bovg1xLP8AWmUe1Yq2MevzTyLEZeSnisLw0UMmzbd1P5aL+9O7aUHnEMLOuy14Vw7jEX AOfWyvrElpQKn0Ep9YGio39QBrxbvEQoP3x1b3puGzoa1B4M81C/0e21EMZ0wgLcZoO0 dlUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Z+aWOd5S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m25si2488854eda.322.2021.02.17.14.37.39; Wed, 17 Feb 2021 14:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=Z+aWOd5S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233674AbhBQWWH (ORCPT + 99 others); Wed, 17 Feb 2021 17:22:07 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:47717 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233653AbhBQWWF (ORCPT ); Wed, 17 Feb 2021 17:22:05 -0500 Received: from ssl.serverraum.org (web.serverraum.org [172.16.0.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 696282223B; Wed, 17 Feb 2021 23:21:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1613600482; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MUhr1niuS+nIf8yyOL3EK0hH/D5TYRo+abH0t2xXTCg=; b=Z+aWOd5SyJshtj3KOxhVN3QTMOCFnaIjPZsRz6IXVijR+Wboe3FSEz9txVrorlpNUaZ5uO H2s7WjBtpcg/dtAfEWpcCx4RkR/hTCru5aZq0X8ygEe5o8DzKR81p+rfNj1RxL3t//ehSb 1/NBURT9R3xZQukqT6/9NDnp+1J/ML4= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 17 Feb 2021 23:21:22 +0100 From: Michael Walle To: Marc Zyngier Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: Re: [PATCH] irqdomain: remove debugfs_file from struct irq_domain In-Reply-To: <87czwys6s1.wl-maz@kernel.org> References: <20210217195717.13727-1-michael@walle.cc> <4e4d0479b935e60a53f75ef534086476@kernel.org> <5c527bfb6f3dfe31b5c25f29418306c6@walle.cc> <87czwys6s1.wl-maz@kernel.org> User-Agent: Roundcube Webmail/1.4.10 Message-ID: <9da32aa719280d2056a84b784d43976e@walle.cc> X-Sender: michael@walle.cc Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 2021-02-17 22:50, schrieb Marc Zyngier: > On Wed, 17 Feb 2021 20:10:50 +0000, > Michael Walle wrote: >> >> Am 2021-02-17 21:02, schrieb Marc Zyngier: >> > On 2021-02-17 19:57, Michael Walle wrote: >> >> Hi Greg, >> >> >> >>> There's no need to keep around a dentry pointer to a simple file that >> >>> debugfs itself can look up when we need to remove it from the system. >> >>> So simplify the code by deleting the variable and cleaning up the >> >>> logic >> >>> around the debugfs file. >> >> >> >> This will generate the following oops on my board (arm64, >> >> freescale/fsl-ls1028a-kontron-sl28-var3-ads2.dts). In debugfs_lookup() >> >> debugfs_mount is NULL. >> > >> > That's odd. I gave it a go yesterday, and nothing blew up. >> > Which makes me wonder whether I had the debug stuff enabled >> > the first place... >> > >> > I've dropped the patch from -next for now until I figure it out >> > (probably tomorrow). >> >> Mh, maybe its my .config, I've attached it. I also noticed that >> the board boots just fine in our kernel-ci [1]. > > I reproduced here. I had disabled GENERIC_IRQ_DEBUGFS for obscure > reasons, and it caught fire as I re-enabled it. > > Adding this fixes it for me: > > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c > index 367ff1c35f75..d8a14cf1a7b6 100644 > --- a/kernel/irq/irqdomain.c > +++ b/kernel/irq/irqdomain.c > @@ -1904,7 +1904,8 @@ static void debugfs_add_domain_dir(struct > irq_domain *d) > > static void debugfs_remove_domain_dir(struct irq_domain *d) > { > - debugfs_remove(debugfs_lookup(d->name, domain_dir)); > + if (domain_dir) > + debugfs_remove(debugfs_lookup(d->name, domain_dir)); > } > > void __init irq_domain_debugfs_init(struct dentry *root) > > > Could you please check whether it works for you? Works for me, too. Thanks. -michael