From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>,
linux-kernel@vger.kernel.org, briannorris@chromium.org,
heiko@sntech.de, dmitry.torokhov@gmail.com,
dianders@chromium.org, tfiga@chromium.org, broonie@kernel.org,
seanpaul@chromium.org, thierry.reding@gmail.com
Subject: Re: [PATCH v3] driver core: Move device_links_purge() after bus_remove_device()
Date: Fri, 20 Oct 2017 13:17:35 +0200 [thread overview]
Message-ID: <2944574.zGy8XCJarq@aspire.rjw.lan> (raw)
In-Reply-To: <20171020062201.GA18761@kroah.com>
On Friday, October 20, 2017 8:22:01 AM CEST Greg KH wrote:
> On Fri, Oct 20, 2017 at 03:22:07AM +0200, Rafael J. Wysocki wrote:
> > On Friday, October 20, 2017 3:23:16 AM CEST Jeffy Chen wrote:
> > > The current ordering of code in device_del() triggers a WARN_ON()
> > > in device_links_purge(), because of an unexpected link status.
> > >
> > > The device_links_unbind_consumers() call in device_release_driver()
> > > has to take place before device_links_purge() for the status of all
> > > links to be correct, so move the device_links_purge() call in
> > > device_del() after the invocation of bus_remove_device() which calls
> > > device_release_driver().
> > >
> > > Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> > > Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> >
> > OK, thanks.
> >
> > Greg, will you take this?
>
> Yes I will. But I don't understand if this is a bugfix that needs to go
> to all stable kernels to resolve a problem that has always been there,
> or it is ok for 4.15-rc1, as it's just a "do things in the correct
> order" type of change.
>
> Any hints?
Technically the problem has always been there, but it is only visible if
device links are used in a specific way and I'm not sure whether or not
there is any code in the tree where that's the case.
That said AFAICS it should be safe to add
Fixes: 9ed9895370ae (driver core: Functional dependencies tracking support)
to it and handle it accordingly.
Thanks,
Rafael
next prev parent reply other threads:[~2017-10-20 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 1:23 Jeffy Chen
2017-10-20 1:22 ` Rafael J. Wysocki
2017-10-20 6:22 ` Greg KH
2017-10-20 11:17 ` Rafael J. Wysocki [this message]
2017-10-20 12:01 ` jeffy
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=2944574.zGy8XCJarq@aspire.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=briannorris@chromium.org \
--cc=broonie@kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=heiko@sntech.de \
--cc=jeffy.chen@rock-chips.com \
--cc=linux-kernel@vger.kernel.org \
--cc=seanpaul@chromium.org \
--cc=tfiga@chromium.org \
--cc=thierry.reding@gmail.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®