Ming Lei d1c6c030fc driver core: fix shutdown races with probe/remove(v3)
Firstly, .shutdown callback may touch a uninitialized hardware
if dev->driver is set and .probe is not completed.

Secondly, device_shutdown() may dereference a null pointer to cause
oops when dev->driver is cleared after it has been checked in
device_shutdown().

So just hold device lock and its parent lock(if it has) to
fix the races.

Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:04:25 -07:00
..
2012-07-05 08:25:34 -07:00
2012-05-04 16:33:16 -07:00
2012-04-18 15:37:35 -07:00
2012-03-14 07:44:11 +01:00
2010-05-21 09:37:29 -07:00