From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754600AbdFLPgC (ORCPT ); Mon, 12 Jun 2017 11:36:02 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45933 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753719AbdFLPf7 (ORCPT ); Mon, 12 Jun 2017 11:35:59 -0400 Date: Mon, 12 Jun 2017 08:31:26 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, tglx@linutronix.de, xiaolong.ye@intel.com, john.stultz@linaro.org, mingo@kernel.org, hpa@zytor.com Reply-To: xiaolong.ye@intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, john.stultz@linaro.org In-Reply-To: <20170609104457.GA39907@inn.lkp.intel.com> References: <20170609104457.GA39907@inn.lkp.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get() Git-Commit-ID: c6503be587e9c5c0aac4e2b45de982352f676a5b 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: c6503be587e9c5c0aac4e2b45de982352f676a5b Gitweb: http://git.kernel.org/tip/c6503be587e9c5c0aac4e2b45de982352f676a5b Author: Thomas Gleixner AuthorDate: Mon, 12 Jun 2017 17:21:26 +0200 Committer: Thomas Gleixner CommitDate: Mon, 12 Jun 2017 17:29:07 +0200 posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get() The refactoring of the posix-timer core to allow better code sharing introduced inverted logic vs. SIGEV_NONE timers in common_timer_get(). That causes hrtimer_forward() to be called on active timers, which rightfully triggers the warning hrtimer_forward(). Make sig_none what it says: signal mode == SIGEV_NONE. Fixes: 91d57bae0868 ("posix-timers: Make use of forward/remaining callbacks") Reported-by: Ye Xiaolong Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: John Stultz Link: http://lkml.kernel.org/r/20170609104457.GA39907@inn.lkp.intel.com --- kernel/time/posix-timers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c index 6e7a70b1..b53a0b5 100644 --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c @@ -644,7 +644,7 @@ void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting) struct timespec64 ts64; bool sig_none; - sig_none = (timr->it_sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE; + sig_none = (timr->it_sigev_notify & ~SIGEV_THREAD_ID) == SIGEV_NONE; iv = timr->it_interval; /* interval timer ? */