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: <tip-51487d9ed1e386f9f0863bbf385e5da8a586bff8@git.kernel.org>
Date:   Thu, 5 Oct 2017 06:06:14 -0700
From:   tip-bot for Kees Cook <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     len.brown@...el.com, pmladek@...e.com, oleg@...hat.com,
        heiko.carstens@...ibm.com, hpa@...or.com, tj@...nel.org,
        manish.chopra@...ium.com, harish.patil@...ium.com,
        cmetcalf@...lanox.com, ralf@...ux-mips.org, jiangshanlai@...il.com,
        geert@...ux-m68k.org, gregkh@...uxfoundation.org,
        keescook@...omium.org, rjw@...ysocki.net, tglx@...utronix.de,
        paulus@...ba.org, mpe@...erman.id.au, kvalo@....qualcomm.com,
        sboyd@...eaurora.org, mingo@...nel.org, stefanr@...6.in-berlin.de,
        linux-kernel@...r.kernel.org, martin.petersen@...cle.com,
        jejb@...ux.vnet.ibm.com, arnd@...db.de, wim@...ana.be,
        jwi@...ux.vnet.ibm.com, schwidefsky@...ibm.com,
        benh@...nel.crashing.org, mdr@....com, mark.gross@...el.com,
        linux@...ck-us.net, sre@...nel.org, viresh.kumar@...aro.org,
        akpm@...ux-foundation.org, sudipm.mukherjee@...il.com,
        ubraun@...ux.vnet.ibm.com, john.stultz@...aro.org, pavel@....cz
Subject: [tip:timers/core] timer: Remove last user of TIMER_INITIALIZER

Commit-ID:  51487d9ed1e386f9f0863bbf385e5da8a586bff8
Gitweb:     https://git.kernel.org/tip/51487d9ed1e386f9f0863bbf385e5da8a586bff8
Author:     Kees Cook <keescook@...omium.org>
AuthorDate: Wed, 4 Oct 2017 16:27:01 -0700
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Thu, 5 Oct 2017 15:01:18 +0200

timer: Remove last user of TIMER_INITIALIZER

Drops the last user of TIMER_INITIALIZER and adapts timer.h to use the
internal version.

Signed-off-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-mips@...ux-mips.org
Cc: Petr Mladek <pmladek@...e.com>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Lai Jiangshan <jiangshanlai@...il.com>
Cc: Sebastian Reichel <sre@...nel.org>
Cc: Kalle Valo <kvalo@....qualcomm.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Pavel Machek <pavel@....cz>
Cc: linux1394-devel@...ts.sourceforge.net
Cc: Chris Metcalf <cmetcalf@...lanox.com>
Cc: linux-s390@...r.kernel.org
Cc: linux-wireless@...r.kernel.org
Cc: Mark Gross <mark.gross@...el.com>
Cc: Wim Van Sebroeck <wim@...ana.be>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: Ursula Braun <ubraun@...ux.vnet.ibm.com>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Viresh Kumar <viresh.kumar@...aro.org>
Cc: Harish Patil <harish.patil@...ium.com>
Cc: Stephen Boyd <sboyd@...eaurora.org>
Cc: Michael Reed <mdr@....com>
Cc: Manish Chopra <manish.chopra@...ium.com>
Cc: Len Brown <len.brown@...el.com>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: linux-pm@...r.kernel.org
Cc: Heiko Carstens <heiko.carstens@...ibm.com>
Cc: Tejun Heo <tj@...nel.org>
Cc: Julian Wiedmann <jwi@...ux.vnet.ibm.com>
Cc: John Stultz <john.stultz@...aro.org>
Cc: "James E.J. Bottomley" <jejb@...ux.vnet.ibm.com>
Cc: linux-watchdog@...r.kernel.org
Cc: linux-scsi@...r.kernel.org
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Oleg Nesterov <oleg@...hat.com>
Cc: Ralf Baechle <ralf@...ux-mips.org>
Cc: Stefan Richter <stefanr@...6.in-berlin.de>
Cc: Guenter Roeck <linux@...ck-us.net>
Cc: netdev@...r.kernel.org
Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: linuxppc-dev@...ts.ozlabs.org
Cc: Sudip Mukherjee <sudipm.mukherjee@...il.com>
Link: https://lkml.kernel.org/r/1507159627-127660-8-git-send-email-keescook@chromium.org

---
 drivers/char/tlclk.c  | 12 +++++-------
 include/linux/timer.h |  2 +-
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
index 6210bff..8eeb419 100644
--- a/drivers/char/tlclk.c
+++ b/drivers/char/tlclk.c
@@ -184,9 +184,8 @@ static unsigned int telclk_interrupt;
 static int int_events;		/* Event that generate a interrupt */
 static int got_event;		/* if events processing have been done */
 
-static void switchover_timeout(unsigned long data);
-static struct timer_list switchover_timer =
-	TIMER_INITIALIZER(switchover_timeout , 0, 0);
+static void switchover_timeout(struct timer_list *t);
+static struct timer_list switchover_timer;
 static unsigned long tlclk_timer_data;
 
 static struct tlclk_alarms *alarm_events;
@@ -805,7 +804,7 @@ static int __init tlclk_init(void)
 		goto out3;
 	}
 
-	init_timer(&switchover_timer);
+	timer_setup(&switchover_timer, switchover_timeout, 0);
 
 	ret = misc_register(&tlclk_miscdev);
 	if (ret < 0) {
@@ -855,9 +854,9 @@ static void __exit tlclk_cleanup(void)
 
 }
 
-static void switchover_timeout(unsigned long data)
+static void switchover_timeout(struct timer_list *unused)
 {
-	unsigned long flags = *(unsigned long *) data;
+	unsigned long flags = tlclk_timer_data;
 
 	if ((flags & 1)) {
 		if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08))
@@ -922,7 +921,6 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id)
 		/* TIMEOUT in ~10ms */
 		switchover_timer.expires = jiffies + msecs_to_jiffies(10);
 		tlclk_timer_data = inb(TLCLK_REG1);
-		switchover_timer.data = (unsigned long) &tlclk_timer_data;
 		mod_timer(&switchover_timer, switchover_timer.expires);
 	} else {
 		got_event = 1;
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 10cc45c..4f7476e 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -87,7 +87,7 @@ struct timer_list {
 
 #define DEFINE_TIMER(_name, _function, _expires, _data)		\
 	struct timer_list _name =				\
-		TIMER_INITIALIZER(_function, _expires, _data)
+		__TIMER_INITIALIZER(_function, _expires, _data, 0)
 
 void init_timer_key(struct timer_list *timer, unsigned int flags,
 		    const char *name, struct lock_class_key *key);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ