public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: htejun@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] sysfs: add devm_sysfs_create_group() and friends
Date: Fri, 30 Oct 2015 07:40:37 -0700	[thread overview]
Message-ID: <20151030144037.GC27072@kroah.com> (raw)
In-Reply-To: <20151030114706.GA2243@localhost>

On Fri, Oct 30, 2015 at 04:47:06AM -0700, Dmitry Torokhov wrote:
> Many drivers create additional driver-specific device attributes when
> binding to the device and providing managed version of sysfs_create_group()
> will simplify unbinding and error handling in probe path for such drivers.

But they really shouldn't, because if they do this, they have raced
userspace and tools don't know that the files are present.

I don't want to encourage drivers to do this at all, so I don't want to
make it easier for them to do things incorrectly.

Yes, I know that input does this for its devices, but I still think it
is wrong and should be changed.  Let's not let this problem spread to
other subsystems please.

thanks,

greg k-h

  reply	other threads:[~2015-10-30 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 11:47 [PATCH] sysfs: add devm_sysfs_create_group() and friends Dmitry Torokhov
2015-10-30 14:40 ` Greg Kroah-Hartman [this message]
2015-10-30 15:13   ` Dmitry Torokhov
2015-11-07  0:24     ` Greg Kroah-Hartman
2015-11-07  7:23       ` Dmitry Torokhov
2017-06-07 17:12         ` Dmitry Torokhov
2017-06-17 19:28           ` 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=20151030144037.GC27072@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=htejun@gmail.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox