lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1325630808.3037.44.camel@work-vm>
Date:	Tue, 03 Jan 2012 14:46:48 -0800
From:	John Stultz <john.stultz@...aro.org>
To:	Greg KH <gregkh@...e.de>
Cc:	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
	alan@...rguk.ukuu.org.uk, NeilBrown <neilb@...e.de>
Subject: Re: [03/75] rtc: Expire alarms after the time is set.

On Tue, 2012-01-03 at 14:32 -0800, Greg KH wrote:
> 3.1-stable review patch.  If anyone has any objections, please let me know.

Again, this one is having problems upstream. Please hold off.

thanks
-john


> ------------------
> 
> From: NeilBrown <neilb@...e.de>
> 
> commit 93b2ec0128c431148b216b8f7337c1a52131ef03 upstream.
> 
> If the alarm time programming in the rtc is ever in the past, it won't fire,
> and any other alarm will be queued after it so they won't fire either.
> 
> So any time that the alarm might be in the past, we need to trigger
> the irq handler to ensure the old alarm is cleared and the timer queue
> is fully in the future.
> 
> This can happen:
>  - when we first initialise the alarm
>  - when we set the time in the rtc.
> 
> so follow both of these by scheduling the timer work function.
> 
> Signed-off-by: NeilBrown <neilb@...e.de>
> [Also catch set_mmss case -jstultz]
> Signed-off-by: John Stultz <john.stultz@...aro.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
> 
> ---
>  drivers/rtc/interface.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> --- a/drivers/rtc/interface.c
> +++ b/drivers/rtc/interface.c
> @@ -72,6 +72,8 @@ int rtc_set_time(struct rtc_device *rtc,
>  		err = -EINVAL;
> 
>  	mutex_unlock(&rtc->ops_lock);
> +	/* A timer might have just expired */
> +	schedule_work(&rtc->irqwork);
>  	return err;
>  }
>  EXPORT_SYMBOL_GPL(rtc_set_time);
> @@ -111,6 +113,8 @@ int rtc_set_mmss(struct rtc_device *rtc,
>  		err = -EINVAL;
> 
>  	mutex_unlock(&rtc->ops_lock);
> +	/* A timer might have just expired */
> +	schedule_work(&rtc->irqwork);
> 
>  	return err;
>  }
> @@ -402,6 +406,8 @@ int rtc_initialize_alarm(struct rtc_devi
>  		timerqueue_add(&rtc->timerqueue, &rtc->aie_timer.node);
>  	}
>  	mutex_unlock(&rtc->ops_lock);
> +	/* maybe that was in the past.*/
> +	schedule_work(&rtc->irqwork);
>  	return err;
>  }
>  EXPORT_SYMBOL_GPL(rtc_initialize_alarm);
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ