timer: Add parenthesis around timer_setup() macro arguments
PATCH 1/1 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.
--- include/linux/timer.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
include/linux/timer.h +5 -4
@@ -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) \
Signature · 6 lines
2.7.4 -- Kees Cook Pixel Security
tip-bot for Kees Cook
merge bottimer: Add parenthesis around timer_setup() macro arguments
Commit-ID: 00ed87da35e88a7a4d7f41673beab52ef828f12b Gitweb: https://git.kernel.org/tip/00ed87da35e88a7a4d7f41673beab52ef828f12b Author: Kees Cook <[email protected]> AuthorDate: Wed, 1 Nov 2017 07:32:50 -0700 Committer: Thomas Gleixner <[email protected]> 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.
--- include/linux/timer.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
include/linux/timer.h +5 -4
@@ -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) \
Hi Kees,
Quoted 6 lines · On Wed, 1 Nov 2017 07:32:50 -0700 Kees Cook <[email protected]> wrote:
In the case where expressions are passed as macro arguments, the LOCKDEP version of the timer macros need enclosing parenthesis.
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Kees Cook <[email protected]>
I have applied that patch to linux-next today pending it appearing in the tip tree.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Hi Kees,
Quoted 1 line · On Wed, 1 Nov 2017 07:32:50 -0700 Kees Cook <[email protected]> wrote:
Quoted 8 lines
Quoted 5 lines
In the case where expressions are passed as macro arguments, the LOCKDEP version of the timer macros need enclosing parenthesis.
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Kees Cook <[email protected]>I have applied that patch to linux-next today pending it appearing in the tip tree.
Thanks! It should be there in tip/timers/core as of several hours ago.
-Kees
Signature · 2 lines
Kees Cook Pixel Security
Hi Kees,
Quoted 9 lines · On Wed, 1 Nov 2017 20:04:05 -0700 Kees Cook <[email protected]> wrote:
Quoted 7 lines · Stephen Rothwell
Hi Kees,
Quoted 4 lines · On Wed, 1 Nov 2017 07:32:50 -0700 Kees Cook <[email protected]> wrote:
In the case where expressions are passed as macro arguments, the LOCKDEP version of the timer macros need enclosing parenthesis.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Reported-by Stephen Rothwell <[email protected]>Signed-off-by Kees Cook <[email protected]>I have applied that patch to linux-next today pending it appearing in the tip tree.
Thanks! It should be there in tip/timers/core as of several hours ago.
Yeah, but there is some testing done before it is included the auto-latest branch, which is what I fetch for linux-next.
Signature · 2 lines
Cheers, Stephen Rothwell