Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1715872pxj; Wed, 19 May 2021 12:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7XhZp6UQuyx4bCmgDSzFeOBcI95W4tRmsjeDB82KzWRVyUJ8yq1BcrEiH70MJwY3kWR5o X-Received: by 2002:aa7:cd6b:: with SMTP id ca11mr591530edb.115.1621451487254; Wed, 19 May 2021 12:11:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621451487; cv=none; d=google.com; s=arc-20160816; b=Z0Zu5HVn+CQSCsRtbU2/NRZYSxkWqI7MUthgetsj9geLLqzJRlilHfrcn5o7ZWF211 21Uxc6CKWrHcelEa+1UZlbWkY7WSamf2LroVo0QCip45MUDVqEKi8IW9gEWUMxkIBrBt 8J/6RBgS7i+PIA3qmfeKFsfLkDv3eHOCt3o8p6gKanooMAC6vZBIP7ODkWvX03HDAefw V/yWcAjVWef9tKU1867y5vHEoQymbzVNZtx07v0gdvhlBWwQU4YXPNhq2gm54EBHhYRh qfyFqPyMrj+5GrvGW35tJNp9yJhvghkK385DEagQoyn6NYZ11D0WJmx5LRZuhqcIVd5p oU/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q74XFfN7I00nkeAA3Gm4B6jFCRAm/m9QCYLiOs7Bwhk=; b=zZY60TtQTph0m3V0OHqzrBDUIBai1AEusJ3HdnNmcoOrvnubaeimqtmDD6qWXdExZ0 SiYWT2KpDnT+niF0GVS8mrJB6Ma7HVpzEpAYVXBuAwR8raUlrFtvbDSvDZvbivZcoHrT iHwrA3FYs+4Pm6NOifUs3khmme8GyFQyUKtmxB9hBS/h9hKe6iJ/a6Taztsvle5RY+xT mrNsjPpUOwebxernL6EBZeDD3TXmw7JLjGkF2LBoZ7UPTayEXAYVQGe93PmBCPp7af4n +KlrGlRUyevTZlIECjdfShJXO5g3uSCKXhNnAu3MWZGKHnesMNrq4Se7xe8O3GNRl5zP Beig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=jDTLUdYD; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si589846ejd.313.2021.05.19.12.11.01; Wed, 19 May 2021 12:11:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-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=@linuxfoundation.org header.s=korg header.b=jDTLUdYD; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242545AbhESFGY (ORCPT + 99 others); Wed, 19 May 2021 01:06:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:54296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232842AbhESFGW (ORCPT ); Wed, 19 May 2021 01:06:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 92D0E6135B; Wed, 19 May 2021 05:05:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621400703; bh=wYYX9ZqE8MzuuAZRGsD7NWSnysXuKB8JlIKz2SrZG7Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jDTLUdYDPOqGsBMcGlgqJPnqMyaL+6ZyGBbXTrwd5gxKE34zpNCuAW3q48aS8oBCE jVXiydajtZ29294JvxkwdUKOzRZV+CreV+bh8Sqqf2YYgUivccXwr1eshu/5M54dld n7oqYbFPbYfTTEIoA6QBTEOQTIwmguh/aG6WnvO0= Date: Wed, 19 May 2021 07:05:00 +0200 From: Greg Kroah-Hartman To: Jeff Johnson 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 Message-ID: References: <20210518163304.3702015-1-gregkh@linuxfoundation.org> <891f28e4c1f3c24ed1b257de83cbb3a0@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, May 18, 2021 at 03:00:44PM -0700, Jeff Johnson wrote: > On 2021-05-18 12:29, Jeff Johnson wrote: > > On 2021-05-18 09:33, Greg Kroah-Hartman wrote: > > > There is no need to keep around the dentry pointers for the debugfs > > > files as they will all be automatically removed when the subdir is > > > removed. So save the space and logic involved in keeping them > > > around by > > > just getting rid of them entirely. > > > > > > By doing this change, we remove one of the last in-kernel user that > > > was > > > storing the result of debugfs_create_bool(), so that api can be > > > cleaned > > > up. > > > > Question not about this specific change, but the general concept > > of keeping (or not keeping) dentry pointers. In the ath drivers, > > as well as in an out-of-tree driver for Android, we keep a > > debugfs dentry pointer to use as a param to relay_open(). > > > > Will we still be able to have a dentry pointer for this purpose? > > Or better, is there a recommended way to get a dentry pointer > > NOT associated with debugfs at all (which would be ideal for > > Android where debugfs is disabled). > > Answering one of my questions: The dentry passed to relay_open() comes > from debugfs_create_dir() which is expected to return a dentry. > > 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. Ideally I want to get rid of the "raw" dentry that debugfs returns to callers, as it has caused odd problems in the past, but that's a very long-term project... thanks, greg k-h