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]
Date:   Wed, 1 Nov 2017 11:10:09 -0700
From:   tip-bot for Kees Cook <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     hpa@...or.com, sfr@...b.auug.org.au, keescook@...omium.org,
        tglx@...utronix.de, linux-kernel@...r.kernel.org, mingo@...nel.org
Subject: [tip:timers/core] timer: Add parenthesis around timer_setup() macro
 arguments

Commit-ID:  00ed87da35e88a7a4d7f41673beab52ef828f12b
Gitweb:     https://git.kernel.org/tip/00ed87da35e88a7a4d7f41673beab52ef828f12b
Author:     Kees Cook <keescook@...omium.org>
AuthorDate: Wed, 1 Nov 2017 07:32:50 -0700
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 1 Nov 2017 19:05:05 +0100

timer: Add parenthesis around timer_setup() macro arguments

In the case where expressions are passed as macro arguments, the LOCKDEP
version of the timer macros need enclosing parenthesis.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Signed-off-by: Kees Cook <keescook@...omium.org>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lkml.kernel.org/r/20171101143250.GA65266@beast

---
 include/linux/timer.h | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/linux/timer.h b/include/linux/timer.h
index 0995048..a1af92b 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -173,11 +173,12 @@ static inline void timer_setup_on_stack(struct timer_list *timer,
  * do want to keep the inline for argument type checking, though.
  */
 # define timer_setup(timer, callback, flags)				\
-		__setup_timer(timer, (TIMER_FUNC_TYPE)callback,		\
-			      (TIMER_DATA_TYPE)timer, flags)
+		__setup_timer((timer), (TIMER_FUNC_TYPE)(callback),	\
+			      (TIMER_DATA_TYPE)(timer), (flags))
 # define timer_setup_on_stack(timer, callback, flags)			\
-		__setup_timer_on_stack(timer, (TIMER_FUNC_TYPE)callback,\
-				       (TIMER_DATA_TYPE)timer, flags)
+		__setup_timer_on_stack((timer),				\
+				       (TIMER_FUNC_TYPE)(callback),	\
+				       (TIMER_DATA_TYPE)(timer), (flags))
 #endif
 
 #define from_timer(var, callback_timer, timer_fieldname) \

Powered by blists - more mailing lists