All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jeff Johnson <jjohnson@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Kees Cook <keescook@chromium.org>, Jason Gunthorpe <jgg@ziepe.ca>,
	Chao Yu <chao@kernel.org>, Leon Romanovsky <leon@kernel.org>,
	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
Date: Wed, 19 May 2021 07:05:00 +0200	[thread overview]
Message-ID: <YKScfFKhxtVqfRkt@kroah.com> (raw)
In-Reply-To: <f539277054c06e1719832b9e99cbf7f1@codeaurora.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

_______________________________________________
b43-dev mailing list
b43-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/b43-dev

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Jeff Johnson <jjohnson@codeaurora.org>
Cc: linux-wireless@vger.kernel.org, Kalle Valo <kvalo@codeaurora.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Kees Cook <keescook@chromium.org>, Jason Gunthorpe <jgg@ziepe.ca>,
	Chao Yu <chao@kernel.org>, Leon Romanovsky <leon@kernel.org>,
	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
Date: Wed, 19 May 2021 07:05:00 +0200	[thread overview]
Message-ID: <YKScfFKhxtVqfRkt@kroah.com> (raw)
In-Reply-To: <f539277054c06e1719832b9e99cbf7f1@codeaurora.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

  reply	other threads:[~2021-05-19  5:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 16:33 [PATCH v2] b43: don't save dentries for debugfs Greg Kroah-Hartman
2021-05-18 16:33 ` Greg Kroah-Hartman
2021-05-18 17:47 ` Kalle Valo
2021-05-18 17:47   ` Kalle Valo
2021-05-21 18:44   ` Greg Kroah-Hartman
2021-05-21 18:44     ` Greg Kroah-Hartman
2021-05-18 19:29 ` Jeff Johnson
2021-05-18 19:29   ` Jeff Johnson
2021-05-18 22:00   ` Jeff Johnson
2021-05-18 22:00     ` Jeff Johnson
2021-05-19  5:05     ` Greg Kroah-Hartman [this message]
2021-05-19  5:05       ` Greg Kroah-Hartman
2021-05-19 15:04       ` Jeff Johnson
2021-05-19 15:04         ` Jeff Johnson
2021-05-19 15:42         ` Greg Kroah-Hartman
2021-05-19 15:42           ` Greg Kroah-Hartman
2021-05-19 15:57           ` Jeff Johnson
2021-05-19 15:57             ` Jeff Johnson
2021-05-19 16:03             ` Greg Kroah-Hartman
2021-05-19 16:03               ` Greg Kroah-Hartman
2021-05-20 22:16               ` Jeff Johnson
2021-05-21  5:12                 ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKScfFKhxtVqfRkt@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=b43-dev@lists.infradead.org \
    --cc=chao@kernel.org \
    --cc=davem@davemloft.net \
    --cc=jgg@ziepe.ca \
    --cc=jjohnson=codeaurora.org@codeaurora.org \
    --cc=jjohnson@codeaurora.org \
    --cc=keescook@chromium.org \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.