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

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

timer: Remove init_timer_pinned() in favor of timer_setup()

This refactors the only users of init_timer_pinned() to use
the new timer_setup() and from_timer(). Drops the definition of
init_timer_pinned().

Signed-off-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: David S. Miller <davem@...emloft.net> # for networking parts
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: "James E.J. Bottomley" <jejb@...ux.vnet.ibm.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: Guenter Roeck <linux@...ck-us.net>
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: Mark Gross <mark.gross@...el.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: Michael Reed <mdr@....com>
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-5-git-send-email-keescook@chromium.org

---
 drivers/net/ethernet/tile/tilepro.c | 9 ++++-----
 include/linux/timer.h               | 2 --
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/net/ethernet/tile/tilepro.c b/drivers/net/ethernet/tile/tilepro.c
index 49ccee4..56d0628 100644
--- a/drivers/net/ethernet/tile/tilepro.c
+++ b/drivers/net/ethernet/tile/tilepro.c
@@ -608,9 +608,9 @@ static void tile_net_schedule_egress_timer(struct tile_net_cpu *info)
  * ISSUE: Maybe instead track number of expected completions, and free
  * only that many, resetting to zero if "pending" is ever false.
  */
-static void tile_net_handle_egress_timer(unsigned long arg)
+static void tile_net_handle_egress_timer(struct timer_list *t)
 {
-	struct tile_net_cpu *info = (struct tile_net_cpu *)arg;
+	struct tile_net_cpu *info = from_timer(info, t, egress_timer);
 	struct net_device *dev = info->napi.dev;
 
 	/* The timer is no longer scheduled. */
@@ -1004,9 +1004,8 @@ static void tile_net_register(void *dev_ptr)
 		BUG();
 
 	/* Initialize the egress timer. */
-	init_timer_pinned(&info->egress_timer);
-	info->egress_timer.data = (long)info;
-	info->egress_timer.function = tile_net_handle_egress_timer;
+	timer_setup(&info->egress_timer, tile_net_handle_egress_timer,
+		    TIMER_PINNED);
 
 	u64_stats_init(&info->stats.syncp);
 
diff --git a/include/linux/timer.h b/include/linux/timer.h
index b10c4bd..9da9035 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -128,8 +128,6 @@ static inline void init_timer_on_stack_key(struct timer_list *timer,
 
 #define init_timer(timer)						\
 	__init_timer((timer), 0)
-#define init_timer_pinned(timer)					\
-	__init_timer((timer), TIMER_PINNED)
 #define init_timer_deferrable(timer)					\
 	__init_timer((timer), TIMER_DEFERRABLE)
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ