kernel-ark/drivers/base
Rafael J. Wysocki da863cddd8 PM / Sleep: Fix race conditions related to wakeup source timer function
If __pm_wakeup_event() has been used (with a nonzero timeout) to
report a wakeup event and then __pm_relax() immediately followed by
__pm_stay_awake() is called or __pm_wakeup_event() is called once
again for the same wakeup source object before its timer expires, the
timer function pm_wakeup_timer_fn() may still be run as a result of
the previous __pm_wakeup_event() call.  In either of those cases it
may mistakenly deactivate the wakeup source that has just been
activated.

To prevent that from happening, make wakeup_source_deactivate()
clear the wakeup source's timer_expires field and make
pm_wakeup_timer_fn() check if timer_expires is different from zero
and if it's not in future before calling wakeup_source_deactivate()
(if timer_expires is 0, it means that the timer has just been
deleted and if timer_expires is in future, it means that the timer
has just been rescheduled to a different time).

Reported-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-03-04 23:08:14 +01:00
..
power PM / Sleep: Fix race conditions related to wakeup source timer function 2012-03-04 23:08:14 +01:00
regmap regmap: Reset cache status when reinitialsing the cache 2012-01-20 13:49:30 +00:00
attribute_container.c
base.h cpu: Do not return errors from cpu_dev_init() which will be ignored 2012-01-11 15:49:43 -08:00
bus.c kernel-doc: fix new warnings in driver-core 2012-01-24 10:47:41 -08:00
class.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
core.c base/core.c:fix typo in comment in function device_add 2012-01-24 10:47:42 -08:00
cpu.c cpu: Register a generic CPU device on architectures that currently do not 2012-01-11 15:50:11 -08:00
dd.c drivers: base: print rejected matches with DEBUG_DRIVER 2011-09-26 16:21:15 -07:00
devres.c devres: Fix a typo in devm_kfree comment 2011-12-21 00:31:47 +01:00
devtmpfs.c Merge branch 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-01-08 12:19:57 -08:00
dma-buf.c dma-buf: Introduce dma buffer sharing mechanism 2012-01-06 10:20:21 +00:00
dma-coherent.c drivers/base: dma-coherent.c is a module and needs module.h 2011-10-31 19:31:38 -04:00
dma-mapping.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
driver.c
firmware_class.c PM / Sleep: Fix read_unlock_usermodehelper() call. 2012-01-23 21:59:08 +01:00
firmware.c
hypervisor.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
init.c driver-core: implement 'sysdev' functionality for regular devices and buses 2011-12-14 14:29:38 -08:00
isa.c
Kconfig dma-buf: drop option text so users don't select it. 2012-01-13 09:05:14 +00:00
Makefile driver core: remove drivers/base/sys.c and include/linux/sysdev.h 2012-01-22 14:31:15 -07:00
map.c
memory.c kdump: add udev events for memory online/offline 2012-01-12 20:13:11 -08:00
module.c
node.c Merge branch 'driver-core-next' into Linux 3.2 2012-01-06 11:42:52 -08:00
platform.c Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm 2012-01-08 13:10:57 -08:00
syscore.c PM: Reintroduce dropped call to check_wakeup_irqs 2011-07-11 10:51:49 +02:00
topology.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
transport_class.c drivers/base: transport_class explicitly requires EXPORT_SYMBOL 2011-10-31 19:31:15 -04:00