Re: [PATCH] RTC: Avoid races between RTC alarm wakeup and suspend.

2012-08-05 Thread Rafael J. Wysocki
ot sufficient. > > > > > > This is because there is no guarantee (that I know of) that the workqueue > > > thread will actually get scheduled before 'suspend' takes over. > > > > I think you are right. > > Thanks. > Here is the revised patch.

Re: [PATCH] RTC: Avoid races between RTC alarm wakeup and suspend.

2012-07-30 Thread NeilBrown
terrupt(), then? > > > I think the pm_stay_awake//pm_relax is needed - just pm_wakup_event() is > > theoretically not sufficient. > > > > This is because there is no guarantee (that I know of) that the workqueue > > thread will actually get scheduled before &#x

Re: [PATCH] RTC: Avoid races between RTC alarm wakeup and suspend.

2012-07-30 Thread Rafael J. Wysocki
On Monday, July 30, 2012, NeilBrown wrote: > > If an RTC alarm fires just as suspend is happening, it is possible for > suspend to complete and the alarm to be missed. > > To avoid the race, we must register the event with the PM core. > > As the event is made visible to userspace through a thre

[PATCH] RTC: Avoid races between RTC alarm wakeup and suspend.

2012-07-29 Thread NeilBrown
If an RTC alarm fires just as suspend is happening, it is possible for suspend to complete and the alarm to be missed. To avoid the race, we must register the event with the PM core. As the event is made visible to userspace through a thread which is only scheduled by the interrupt, we need a pm