diff options
author | Gary S. Robertson <gary.robertson@linaro.org> | 2014-09-10 14:57:16 -0500 |
---|---|---|
committer | Gary S. Robertson <gary.robertson@linaro.org> | 2014-09-10 16:32:00 -0500 |
commit | 4692cd2b4abffbe531582c95fa44d5a1005760f5 (patch) | |
tree | cd4616337b894b1120da0f4d26c619af493f241b | |
parent | c79fdd5cf1c4c6239ddaf998c3bfc5b4839e04e5 (diff) |
hrtimer.h: prevent pinned timer state from breaking inactive testlinux-lng-3.14.12-2014.09linux-lng-v3.14.x
An hrtimer may be pinned to a CPU but inactive, so it is no longer valid
to test the hrtimer.state struct member as having no bits set when inactive.
Changed the test function to mask out the HRTIMER_STATE_PINNED bit when
checking for inactive state.
Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
-rw-r--r-- | include/linux/hrtimer.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index 9f593e8a561b..36fcc90b794a 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -404,7 +404,7 @@ extern ktime_t hrtimer_get_next_event(void); */ static inline int hrtimer_active(const struct hrtimer *timer) { - return timer->state != HRTIMER_STATE_INACTIVE; + return (timer->state & (~HRTIMER_STATE_PINNED)) != HRTIMER_STATE_INACTIVE; } /* |