From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754917AbdKASNZ (ORCPT ); Wed, 1 Nov 2017 14:13:25 -0400 Received: from terminus.zytor.com ([65.50.211.136]:37355 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754586AbdKASNX (ORCPT ); Wed, 1 Nov 2017 14:13:23 -0400 Date: Wed, 1 Nov 2017 11:10:09 -0700 From: tip-bot for Kees Cook Message-ID: Cc: hpa@zytor.com, sfr@canb.auug.org.au, keescook@chromium.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, mingo@kernel.org Reply-To: hpa@zytor.com, tglx@linutronix.de, keescook@chromium.org, sfr@canb.auug.org.au, linux-kernel@vger.kernel.org, mingo@kernel.org In-Reply-To: <20171101143250.GA65266@beast> References: <20171101143250.GA65266@beast> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] timer: Add parenthesis around timer_setup() macro arguments Git-Commit-ID: 00ed87da35e88a7a4d7f41673beab52ef828f12b X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 00ed87da35e88a7a4d7f41673beab52ef828f12b Gitweb: https://git.kernel.org/tip/00ed87da35e88a7a4d7f41673beab52ef828f12b Author: Kees Cook AuthorDate: Wed, 1 Nov 2017 07:32:50 -0700 Committer: Thomas Gleixner 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 Signed-off-by: Kees Cook Signed-off-by: Thomas Gleixner 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) \