]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "rtc: Expire alarms after the time is set."
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jan 2012 15:57:22 +0000 (07:57 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jan 2012 15:57:22 +0000 (07:57 -0800)
commit51621d7ec671a2188ad6d4363fbc9a9e900d18c7
treef2d9589bc443e99c8843a8ca18c44956d61fcf28
parent63cf79fcd135555c4605b41e5dec3c899a70d433
Revert "rtc: Expire alarms after the time is set."

This reverts commit 7db6db0e580d2b87abb39c1b3cdae13d27d714ec.

The call to "schedule_work()" in rtc_initialize_alarm() happens too
early, and can cause oopses at bootup

Neil Brown explains why we do it:

  "If you set an alarm in the future, then shutdown and boot again after
   that time, then you will end up with a timer_queue node which is in
   the past.

   When this happens the queue gets stuck.  That entry-in-the-past won't
   get removed until and interrupt happens and an interrupt won't happen
   because the RTC only triggers an interrupt when the alarm is "now".

   So you'll find that e.g.  "hwclock" will always tell you that
   'select' timed out.

   So we force the interrupt work to happen at the start just in case."

and has a patch that convert it to do things in-process rather than with
the worker thread, but right now it's too late to play around with this,
so we just revert the patch that caused problems for now.

Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Requested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Requested-by: John Stultz <john.stultz@linaro.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/rtc/interface.c