From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get()
Date: Mon, 12 Jun 2017 08:31:26 -0700 [thread overview]
Message-ID: <tip-c6503be587e9c5c0aac4e2b45de982352f676a5b@git.kernel.org> (raw)
In-Reply-To: <20170609104457.GA39907@inn.lkp.intel.com>
Commit-ID: c6503be587e9c5c0aac4e2b45de982352f676a5b
Gitweb: http://git.kernel.org/tip/c6503be587e9c5c0aac4e2b45de982352f676a5b
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Mon, 12 Jun 2017 17:21:26 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
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 <xiaolong.ye@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
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 ? */
prev parent reply other threads:[~2017-06-12 15:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 10:44 [posix] 91d57bae08: WARNING:at_kernel/time/hrtimer.c:#hrtimer_forward kernel test robot
2017-06-12 8:42 ` Thomas Gleixner
2017-06-12 8:59 ` Ye Xiaolong
2017-06-12 15:31 ` tip-bot for Thomas Gleixner [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-c6503be587e9c5c0aac4e2b45de982352f676a5b@git.kernel.org \
--to=tipbot@zytor.com \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=xiaolong.ye@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome