driver model: replace rwlock in struct bus_type with a rwsem.
Synchronize all walks of the device and driver lists of a bus with an rwsem wrapped around the entire iterator, instead of using device_lock and dropping it after we grabbed each node. Note this also prevents deadlock when walking the list of drivers and calling get_driver(), since get_driver() tries to take device_lock while we already have it held.
Showing
Please register or sign in to comment