linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>,
	linux-fsdevel@vger.kernel.org,
	Kishon Vijay Abraham I <kishon@ti.com>
Subject: Re: [RFC] configfs_unregister_group() API
Date: Fri, 2 Aug 2019 08:52:57 +0200	[thread overview]
Message-ID: <20190802065257.GA7786@lst.de> (raw)
In-Reply-To: <20190730211355.GU1131@ZenIV.linux.org.uk>

On Tue, Jul 30, 2019 at 10:13:55PM +0100, Al Viro wrote:
> 	AFAICS, it (and configfs_unregister_default_group())
> will break if called with group non-empty (i.e. when rmdir(2)
> would've failed with -ENOTEMPTY); configfs_detach_prep()
> is called, but return value is completely ignored.
> 
> 	Similar breakage happens in configfs_unregister_subsystem(),
> but there it looks like the drivers are responsible for not calling
> it that way.  It yells if configfs_detach_prep() fails and AFAICS
> all callers do guarantee it never happens.
> 
> 	configfs_unregister_group() is quiet; from my reading of
> the callers, only pci-endpoint might end up calling it for group
> that is not guaranteed to be empty.  I'm not familiar with
> pci-endpoint guts, so I might very well be missing something there.
> 
> Questions to configfs API maintainers (that'd be Christoph, these
> days, AFAIK)
> 
> 1) should such a call be considered a driver bug?
> 2) should configfs_unregister_group() at least warn when that happens?

Yes, I'm patch monkeying these days.  From my POV expecting it to
act recursively seems like a bug, and we should at the very least warn.

      parent reply	other threads:[~2019-08-02  6:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 21:13 [RFC] configfs_unregister_group() API Al Viro
2019-08-02  3:35 ` Al Viro
2019-08-02  6:52 ` Christoph Hellwig [this message]

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=20190802065257.GA7786@lst.de \
    --to=hch@lst.de \
    --cc=kishon@ti.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).