From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDFAEC433B4 for ; Wed, 19 May 2021 15:05:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C81FF61059 for ; Wed, 19 May 2021 15:05:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242412AbhESPG0 (ORCPT ); Wed, 19 May 2021 11:06:26 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:12666 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233074AbhESPGX (ORCPT ); Wed, 19 May 2021 11:06:23 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1621436703; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=mbm/KQC14is0rErwVc62s6au2BQPmhOMig0Vh7EVlik=; b=YG89gierrGnOs6t8cExoJSs8xMPS2R3RzLZEaoDqN+81MO2TSEFmc/Di6sH4TCDlJHJO8qrB mZmEfDUhxFqdD2P4yH4MZQ/9NOl1PYrYwNIR3gMksar883LgCRn+vbyLDNb3+5SxTLXrVeV3 Qfc03kXsAI9qX2mi9CzqKyikVGg= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-west-2.postgun.com with SMTP id 60a5291b2bff04e53b2d3be6 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 19 May 2021 15:04:59 GMT Sender: jjohnson=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id AB02CC4338A; Wed, 19 May 2021 15:04:59 +0000 (UTC) Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: jjohnson) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1F866C433D3; Wed, 19 May 2021 15:04:59 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 19 May 2021 08:04:59 -0700 From: Jeff Johnson To: Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, Kalle Valo , "David S. Miller" , Jakub Kicinski , Kees Cook , Jason Gunthorpe , Chao Yu , Leon Romanovsky , b43-dev@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jjohnson=codeaurora.org@codeaurora.org Subject: Re: [PATCH v2] b43: don't save dentries for debugfs In-Reply-To: References: <20210518163304.3702015-1-gregkh@linuxfoundation.org> <891f28e4c1f3c24ed1b257de83cbb3a0@codeaurora.org> Message-ID: <2eb3af43025436c0832c8f61fbf519ad@codeaurora.org> X-Sender: jjohnson@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-05-18 22:05, Greg Kroah-Hartman wrote: > On Tue, May 18, 2021 at 03:00:44PM -0700, Jeff Johnson wrote: >> On 2021-05-18 12:29, Jeff Johnson wrote: >> Would still like guidance on if there is a recommended way to get a >> dentry not associated with debugfs. > > What do you exactly mean by "not associated with debugfs"? > > And why are you passing a debugfs dentry to relay_open()? That feels > really wrong and fragile. I don't know the history but the relay documentation tells us: "If you want a directory structure to contain your relay files, you should create it using the host filesystem’s directory creation function, e.g. debugfs_create_dir()..." So my guess is that the original implementation followed that advice. I see 5 clients of this functionality, and all 5 pass a dentry returned from debugfs_create_dir(): drivers/gpu/drm/i915/gt/uc/intel_guc_log.c, line 384 drivers/net/wireless/ath/ath10k/spectral.c, line 534 drivers/net/wireless/ath/ath11k/spectral.c, line 902 drivers/net/wireless/ath/ath9k/common-spectral.c, line 1077 kernel/trace/blktrace.c, line 549 Jeff -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project