Cc: Rafael J. Wysocki <rjw@...>, Pierre Ossman <drzeus-mmc@...>, Zdenek Kabelac <zdenek.kabelac@...>, Kernel development list <linux-kernel@...>, pm list <linux-pm@...>
It's protected by whatever existing locking scheme allows only one
task to start a system sleep at a time. For example, the suspending
task has to get a write lock on pm_sleep_rwsem.
Yes, if the suspending task exits before the system has woken up,
you're in trouble regardless.
We aren't necessarily UP. But since all that matters is whether or not
suspend_task is equal to the current task, no extra locking is needed.
I'll add a comment explaining all this.
Alan Stern
--