Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6798867pxb; Wed, 17 Feb 2021 13:53:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjkWTA1pjXWq8FMtpGAxkf9dLMgAOC5WQbRsx1kiChSeg2+x77lCuBZoJSAFdNWfvfJo37 X-Received: by 2002:a17:906:b803:: with SMTP id dv3mr984807ejb.536.1613598822650; Wed, 17 Feb 2021 13:53:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613598822; cv=none; d=google.com; s=arc-20160816; b=xmi53jKnZBjUt9vawOHC4nUchQL6D36H4Jcar0BCqMlE1hVCqRTdkisF6NuL09uxxj hBbou7s0DaRO931aHFxVn5MolR2sdtincqWCOpEEzj2nRCliawBp6GcVS1dTAnxZOxSh Rc2gqgjC0+Shk4toWIlyM3WBxZK6Fmd9eF++4pyykQZjXliYQhsZsYAeCmguB/caxBc7 7GymFIV7FdomckuMUPG54thQVJPiZzV+q/mg8Xu6EtlCRTCk2uj/GyiKbYWCztXw6nVZ kFm9ZV8aWUC0rkc+TagAPTmbkqvLFDUwUln9LhsXS+jRLLvduPdH48c+sTsaqUM5m7Pd rfsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=hrDUlABV8hWXQbw/+wPk1RO3CCNTbbLW5mOYtAzvIIg=; b=F3M50GO6n0bp7NnB6MqtPG4lUUSVVvQmMWG8IUmjGsYlU1SJM7ZrnNF9He360P5xnv K3Dz9uQ9n+mI4iFyL0L+n3GUGh+ifru0nIT6zFGUQlKSS9WSK+SoWClDx78STXweP+63 AW/+stmedBPN6cpJNntE31uGVlz8JvY2Dkbw8s6M1U0mlRgiEOPEYF/zg/rXqM09ibYF nNKMHyBOOXYATYixeuQsNgdASUw+Vv0UashJjGphjMlF6nSC7z67Yj9iMpA4bWGS5l7P NXL4XhyrvY2ba/fPMsvxUg7hpf4mgLoMZOgonaKid3IEdNvnc9dgnLnbp9ekOd7P+7Qa Xygg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si2262951ejx.434.2021.02.17.13.53.17; Wed, 17 Feb 2021 13:53:42 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229707AbhBQVvu (ORCPT + 99 others); Wed, 17 Feb 2021 16:51:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:54870 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbhBQVvh (ORCPT ); Wed, 17 Feb 2021 16:51:37 -0500 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (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 75EC064E76; Wed, 17 Feb 2021 21:50:56 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lCUik-00EfP1-8P; Wed, 17 Feb 2021 21:50:54 +0000 Date: Wed, 17 Feb 2021 21:50:38 +0000 Message-ID: <87czwys6s1.wl-maz@kernel.org> From: Marc Zyngier To: Michael Walle 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: <5c527bfb6f3dfe31b5c25f29418306c6@walle.cc> References: <20210217195717.13727-1-michael@walle.cc> <4e4d0479b935e60a53f75ef534086476@kernel.org> <5c527bfb6f3dfe31b5c25f29418306c6@walle.cc> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: michael@walle.cc, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, tglx@linutronix.de X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks, M. -- Without deviation from the norm, progress is not possible.