From: Lucas Stach <l.stach@pengutronix.de>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, patchwork-lst@pengutronix.de,
kernel@pengutronix.de
Subject: Re: [PATCH] driver core: unbind consumers before locking parent on device unbind
Date: Fri, 17 Feb 2017 19:46:53 +0100 [thread overview]
Message-ID: <1487357213.13536.60.camel@pengutronix.de> (raw)
In-Reply-To: <20170217184242.GA11935@kroah.com>
Am Freitag, den 17.02.2017, 10:42 -0800 schrieb Greg Kroah-Hartman:
> On Fri, Feb 17, 2017 at 07:36:29PM +0100, Lucas Stach wrote:
> > On forced unbind the parent lock is taken, as the device might be a USB
> > device. The device to be unbound might have active consumers, which
> > must be unbound before calling device_release_driver(), otherwise this
> > function might deadlock when trying to take the parent lock during
> > consumer unbind.
>
> Really? What type of device does this fail on today?
Regular devices on a MMIO bus. __device_release_driver() will take the
parent lock unconditionally when it unbinds consumer devices. So if the
forced unbound device is on the same bus as the consumer we will
deadlock right there.
Regards,
Lucas
prev parent reply other threads:[~2017-02-17 18:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 18:36 Lucas Stach
2017-02-17 18:42 ` Greg Kroah-Hartman
2017-02-17 18:46 ` Lucas Stach [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=1487357213.13536.60.camel@pengutronix.de \
--to=l.stach@pengutronix.de \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=patchwork-lst@pengutronix.de \
/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®