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>] [day] [month] [year] [list]
Date:	Wed, 8 Apr 2015 18:25:07 +1000
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...e.hu>, "H. Peter Anvin" <hpa@...or.com>,
	Peter Zijlstra <peterz@...radead.org>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	Matthew Garrett <matthew.garrett@...ula.com>,
	Xunlei Pang <pang.xunlei@...aro.org>
Subject: linux-next: manual merge of the akpm-current tree with the tip tree

Hi Andrew,

Today's linux-next merge of the akpm-current tree got a conflict in
drivers/rtc/class.c between commit 0fa88cb4b82b ("time, drivers/rtc:
Don't bother with rtc_resume() for the nonstop clocksource") from the
tip tree and commit df9d6ec42558 ("rtc: restore alarm after resume")
from the akpm-current tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc drivers/rtc/class.c
index c29ba7e14304,d46549ce8fd9..000000000000
--- a/drivers/rtc/class.c
+++ b/drivers/rtc/class.c
@@@ -55,7 -55,9 +55,9 @@@ static int rtc_suspend(struct device *d
  	struct timespec64	delta, delta_delta;
  	int err;
  
+ 	rtc->valid_alarm = !rtc_read_alarm(rtc, &rtc->alarm);
+ 
 -	if (has_persistent_clock())
 +	if (timekeeping_rtc_skipsuspend())
  		return 0;
  
  	if (strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE) != 0)
@@@ -102,7 -104,28 +104,28 @@@ static int rtc_resume(struct device *de
  	struct timespec64	sleep_time;
  	int err;
  
+ 	/*
+ 	 * Ensure that the platform hasn't overwritten a pending alarm while
+ 	 * suspended
+ 	 */
+ 	if (rtc->valid_alarm) {
+ 		long now, scheduled;
+ 
+ 		rtc_read_time(rtc, &tm);
+ 		rtc_tm_to_time(&rtc->alarm.time, &scheduled);
+ 		rtc_tm_to_time(&tm, &now);
+ 
+ 		/* Clear the alarm registers if it went off during suspend */
+ 		if (scheduled <= now) {
+ 			rtc_time_to_tm(0, &rtc->alarm.time);
+ 			rtc->alarm.enabled = 0;
+ 		}
+ 
+ 		if (rtc->ops && rtc->ops->set_alarm)
+ 			rtc->ops->set_alarm(rtc->dev.parent, &rtc->alarm);
+ 	}
+ 
 -	if (has_persistent_clock())
 +	if (timekeeping_rtc_skipresume())
  		return 0;
  
  	rtc_hctosys_ret = -ENODEV;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ