summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2002-10-15 20:18:11 -0700
committerPatrick Mochel <mochel@osdl.org>2002-10-15 20:18:11 -0700
commit65d20c546504e697fd06dca3dd62459416e7762c (patch)
tree850400d98da5c1cc89e6d14b2d6b6eb3286ddadc /include/linux
parent5a7728c6d3eb83df9d120944cca4cf476dd326a1 (diff)
driver model: make device_unregister() only mark device as !present.
There are races WRT walking the lists of the buses and classes and the device being unregistered while it's the current node we're accessing. If the node was deleted, ->next would point to itself, and we'd sit in an inifinite loop (until that memory was freed from underneath us and we Oops'd). This changes device_unregister() to only mark the device as not present. put_device() deletes the device from all the lists it belongs to, while holding device_lock, then drops it to call device_del(). This should guarantee that everything in the device is valid until the last reference goes away, regardless of whether it's still physically present or not.
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions