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-next>] [day] [month] [year] [list]
Date:	Wed, 06 Feb 2013 20:22:45 +0900
From:	Jonghwa Lee <jonghwa3.lee@...sung.com>
To:	linux-kernel@...r.kernel.org
Cc:	a.zummo@...ertech.it, Andrew Morton <akpm@...ux-foundation.org>,
	rtc-linux@...glegroups.com, Jonghwa Lee <jonghwa3.lee@...sung.com>
Subject: [PATCH] rtc: core: Prevent repeated calling of alarm_irq_enable().

This patch removes repeated execution of disabling alarm in
rtc_alarm_irq_enable() of rtc core interface. It made useless
call even all alarm had been disabled from rtc_timer_remove().
We'd better to skip disabling alarm when timer queue is empty.

Signed-off-by: Jonghwa Lee <jonghwa3.lee@...sung.com>
---
 drivers/rtc/interface.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c
index 9592b93..11cfb76 100644
--- a/drivers/rtc/interface.c
+++ b/drivers/rtc/interface.c
@@ -428,7 +428,7 @@ int rtc_alarm_irq_enable(struct rtc_device *rtc, unsigned int enabled)
 			rtc_timer_remove(rtc, &rtc->aie_timer);
 	}
 
-	if (err)
+	if (err || !rtc->timerqueue.next)
 		/* nothing */;
 	else if (!rtc->ops)
 		err = -ENODEV;
-- 
1.7.9.5

--
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