Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1663915 > unrolled thread

[tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get()

Started bytip-bot for Thomas Gleixner <tipbot@zytor.com>
First post2017-06-12 18:40 +0200
Last post2017-06-12 18:40 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in  common_timer_get() tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-06-12 18:40 +0200

#1663915 — [tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get()

Fromtip-bot for Thomas Gleixner <tipbot@zytor.com>
Date2017-06-12 18:40 +0200
Subject[tip:timers/core] posix-timers: Fix inverted SIGEV_NONE logic in common_timer_get()
Message-ID<tRAxI-4uO-21@gated-at.bofh.it>
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 ? */

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web