summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorDavid Fries <david@fries.net>2014-04-16 06:21:21 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-16 21:07:51 (GMT)
commit18d7f891bcc7e49f2900215f17a861ccec34b138 (patch)
treeb70c5385376b8463fc4d1850574d7c7d8be9e4b1 /ipc
parent593ceb0c7046c640cf463022189428a45219f595 (diff)
downloadlinux-18d7f891bcc7e49f2900215f17a861ccec34b138.tar.xz
w1: avoid recursive device_add
__w1_attach_slave_device calls device_add which calls w1_bus_notify which calls the w1_bq27000 slave driver, which calls platform_device_add and device_add and deadlocks on getting &(&priv->bus_notifier)->rwsem as it is still held in the previous device_add. This avoids the problem by processing the family add/remove outside of the slave device_add call. Commit 47eba33a0997fc7362a introduced this deadlock and added a KOBJ_ADD, as the add was already reported in device_register two add events were being sent. This change suppresses the device_register add so that any slave device sysfs entries are setup before the add goes out. Belisko Marek reported this change fixed the deadlock he was seeing on ARM device tree, while testing on my x86-64 system never saw the deadlock. Reported-by: Belisko Marek <marek.belisko@gmail.com> Signed-off-by: David Fries <David@Fries.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions