tick_check_replacement() returns if a replacement of clock_event_device is possible or not. It does this as the first check:
if (tick_check_percpu(curdev, newdev, smp_processor_id())) return false;
This looks wrong as we are returning false when tick_check_percpu() returned true. Probably Thomas forgot '!' here in his commit: 03e13cf5e ?
Fix it by placing a '!' before tick_check_percpu().
Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- kernel/time/tick-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 0156612..0a0608e 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -276,7 +276,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev, bool tick_check_replacement(struct clock_event_device *curdev, struct clock_event_device *newdev) { - if (tick_check_percpu(curdev, newdev, smp_processor_id())) + if (!tick_check_percpu(curdev, newdev, smp_processor_id())) return false;
return tick_check_preferred(curdev, newdev);