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:	Thu, 1 May 2008 18:51:09 -0400 (EDT)
From:	Steven Rostedt <rostedt@...dmis.org>
To:	LKML <linux-kernel@...r.kernel.org>
cc:	akpm@...l.org, Atsushi Nemoto <anemo@....ocn.ne.jp>,
	Andrew Sharp <andy.sharp@...tor.com>
Subject: [PATCH] fix irq flags in rtc-ds1511


The file in drivers/rtc/rtc-ds1551.c uses "int" for flags. This can
cause hard to find bugs on some architectures. This patch converts the
flags to use "long" instead.

This bug was discovered by doing an allyesconfig make on the -rt kernel
where checks are done to ensure all flags are of size sizeof(long).

Signed-off-by: Steven Rostedt <srostedt@...hat.com>
---
 drivers/rtc/rtc-ds1511.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-compile.git/drivers/rtc/rtc-ds1511.c
===================================================================
--- linux-compile.git.orig/drivers/rtc/rtc-ds1511.c	2008-05-01 16:58:49.000000000 -0400
+++ linux-compile.git/drivers/rtc/rtc-ds1511.c	2008-05-01 18:41:47.000000000 -0400
@@ -184,7 +184,7 @@ ds1511_wdog_disable(void)
 static int ds1511_rtc_set_time(struct device *dev, struct rtc_time *rtc_tm)
 {
 	u8 mon, day, dow, hrs, min, sec, yrs, cen;
-	unsigned int flags;
+	unsigned long flags;

 	/*
 	 * won't have to change this for a while
@@ -247,7 +247,7 @@ static int ds1511_rtc_set_time(struct de
 static int ds1511_rtc_read_time(struct device *dev, struct rtc_time *rtc_tm)
 {
 	unsigned int century;
-	unsigned int flags;
+	unsigned long flags;

 	spin_lock_irqsave(&ds1511_lock, flags);
 	rtc_disable_update();

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