diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-02-17 22:39:20 (GMT) |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-03-04 22:08:02 (GMT) |
commit | d94aff87826ee6aa43032f4c0263482913f4e2c8 (patch) | |
tree | 716777b9f6e3642d4fcd11e14000da92773b1edb /fs/cachefiles | |
parent | 69f1d475cc80c55121852b3030873cdd407fd31c (diff) | |
download | linux-fsl-qoriq-d94aff87826ee6aa43032f4c0263482913f4e2c8.tar.xz |
PM / Sleep: Fix possible infinite loop during wakeup source destruction
If wakeup_source_destroy() is called for an active wakeup source that
is never deactivated, it will spin forever. To prevent that from
happening, make wakeup_source_destroy() call __pm_relax() for the
wakeup source object it is about to free instead of waiting until
it will be deactivated by someone else. However, for this to work
it also needs to make sure that the timer function will not be
executed after the final __pm_relax(), so make it run
del_timer_sync() on the wakeup source's timer beforehand.
Additionally, update the kerneldoc comment to document the
requirement that __pm_stay_awake() and __pm_wakeup_event() must not
be run in parallel with wakeup_source_destroy().
Reported-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'fs/cachefiles')
0 files changed, 0 insertions, 0 deletions