From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Thierry Reding <thierry.reding@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Grygorii Strashko <grygorii.strashko@ti.com>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] driver core: Ensure proper suspend/resume ordering
Date: Tue, 22 Sep 2015 02:26:32 +0200 [thread overview]
Message-ID: <2256962.SaUkYyVfIx@vostro.rjw.lan> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1509211031210.1713-100000@iolanthe.rowland.org>
On Monday, September 21, 2015 10:34:54 AM Alan Stern wrote:
> On Mon, 21 Sep 2015, Thierry Reding wrote:
>
> > > > Force-removing drivers that depend on a device that's being unbound
> > > > would be a possibility to solve the problem where consumers depend on a
> > > > device that could physically go away. It might also be the right thing
> > > > to do in any case. Presumably somebody unloading a module want to do
> > > > just that, and refusing to do so isn't playing very nice. Of course
> > > > allowing random modules to be removed even if a lot of consumers might
> > > > depend on it may not be friendly either. Consider if you unload a GPIO
> > > > driver that provides a pin that's used to enable power to an eMMC that
> > > > might have the root filesystem.
> > > >
> > > > Then again, if you unload a module you better know what you're doing
> > > > anyway, so maybe that's not something we need to be concerned about.
> > >
> > > I think that it's better to fail module unloads in such cases by
> > > default (to prevent simple silly mistakes from having possibly severe
> > > consequences), but if a "force" option is used, we should regard that
> > > as "the user really means it" and do as requested. That would be very
> > > much analogous to the hot-unplug situation from the software
> > > perspective.
> >
> > Sounds very reasonable to me.
>
> I'm not so sure about this. For one thing, how are you going to
> distinguish which module unloads are safe?
Ones that have no dependencies?
Very simple: If the driver being unloaded is explicitly depended on by
something (ie. there is a "device link" to it), we fail the unload with
-EBUSY unless the "force" option is used.
> For another, even if you do make this distinction, don't you think
> people will get into the habit of always using the "force" option? My
> impression is that most module unloads end up causing some device to be
> unbound from a driver, or even completely deregistered.
>
> Right now the kernel uses the "You better know what you're doing when
> you unload a module" point of view, and I don't see any good reasons
> for changing.
Well, is that point of view appropriate from the users' perspective?
Thanks,
Rafael
next prev parent reply other threads:[~2015-09-21 23:58 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 10:19 Thierry Reding
2015-09-10 10:58 ` Grygorii Strashko
2015-09-10 22:08 ` Rafael J. Wysocki
2015-09-11 12:03 ` Thierry Reding
2015-09-11 19:01 ` Alan Stern
2015-09-11 22:28 ` Rafael J. Wysocki
2015-09-12 17:40 ` Alan Stern
2015-09-15 0:40 ` Rafael J. Wysocki
2015-09-15 14:23 ` Alan Stern
2015-09-16 1:04 ` Rafael J. Wysocki
2015-09-16 13:39 ` Grygorii Strashko
2015-09-16 19:27 ` Alan Stern
2015-09-17 0:07 ` Rafael J. Wysocki
2015-09-17 15:48 ` Grygorii Strashko
2015-09-17 23:59 ` Rafael J. Wysocki
2015-09-18 0:03 ` Rafael J. Wysocki
2015-10-01 18:14 ` Grygorii Strashko
2015-09-15 16:10 ` Thierry Reding
2015-09-15 19:18 ` Alan Stern
2015-09-16 1:28 ` Rafael J. Wysocki
2015-09-16 13:38 ` Grygorii Strashko
2015-09-16 16:58 ` Alan Stern
2015-09-16 17:08 ` Alan Stern
2015-09-16 13:16 ` Thierry Reding
2015-09-16 19:22 ` Alan Stern
2015-09-17 0:27 ` Rafael J. Wysocki
2015-09-17 2:04 ` Rafael J. Wysocki
2015-09-17 17:02 ` Alan Stern
2015-09-17 18:43 ` Rafael J. Wysocki
2015-09-17 21:06 ` Alan Stern
2015-09-18 0:13 ` Rafael J. Wysocki
2015-09-18 15:55 ` Thierry Reding
2015-09-18 23:07 ` Rafael J. Wysocki
2015-09-21 8:51 ` Thierry Reding
2015-09-21 14:34 ` Alan Stern
2015-09-22 0:26 ` Rafael J. Wysocki [this message]
2015-09-22 1:22 ` Alan Stern
2015-09-22 0:39 ` Rafael J. Wysocki
2015-09-17 5:40 ` Tomeu Vizoso
2015-09-17 18:15 ` Rafael J. Wysocki
2015-09-17 19:21 ` Alan Stern
2015-09-11 22:38 ` Rafael J. Wysocki
2015-09-15 15:53 ` Thierry Reding
2015-09-16 1:18 ` Rafael J. Wysocki
2015-09-16 13:38 ` Grygorii Strashko
2015-09-17 0:55 ` Rafael J. Wysocki
2015-09-11 14:05 ` Alan Stern
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=2256962.SaUkYyVfIx@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=gregkh@linuxfoundation.org \
--cc=grygorii.strashko@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=thierry.reding@gmail.com \
--cc=tomeu.vizoso@collabora.com \
/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
all inboxes | Powered by JetHome®