Sorry, I don't understand. Are you worried that process A might set
suspending_task = A but then process B might still see suspending_task
== NULL? Or that A might set suspend_task = NULL but then B might
still see suspending_task == A?
Neither one will cause any problem, since the only case that matters is
when B sees suspending_task == B -- and that can happen if and only if
B was the last process to set suspending_task.
In fact, you might as well get rid of the set_suspending_task() routine
entirely and just put the assignments inline.
Where is this get_device() undone? Shouldn't there be an extra
put_device() added to unregister_dropped_devices()?
And now the change to device_destroy() isn't needed at all.
Alan Stern
--