Commit 1fdd2859 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Greg Kroah-Hartman

driver core: Add missing dev->bus->need_parent_lock checks

commit e121a833 upstream.

__device_release_driver() has to check dev->bus->need_parent_lock
before dropping the parent lock and acquiring it again as it may
attempt to drop a lock that hasn't been acquired or lock a device
that shouldn't be locked and create a lock imbalance.

Fixes: 8c97a46a (driver core: hold dev's parent lock when needed)
Signed-off-by: default avatarRafael J. Wysocki <>
Cc: stable <>
Reviewed-by: Daniel Vetter's avatarDaniel Vetter <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent a38adf5a
......@@ -933,11 +933,11 @@ static void __device_release_driver(struct device *dev, struct device *parent)
while (device_links_busy(dev)) {
if (parent)
if (parent && dev->bus->need_parent_lock)
if (parent)
if (parent && dev->bus->need_parent_lock)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment