]> Git Repo - linux.git/commitdiff
nohz: Fix notifier return val that enforce timekeeping
authorLi Zhong <[email protected]>
Fri, 17 May 2013 08:44:04 +0000 (16:44 +0800)
committerIngo Molnar <[email protected]>
Fri, 31 May 2013 09:33:10 +0000 (11:33 +0200)
In tick_nohz_cpu_down_callback() if the cpu is the one handling
timekeeping, we must return something that stops the CPU_DOWN_PREPARE
notifiers and then start notify CPU_DOWN_FAILED on the already called
notifier call backs.

However traditional errno values are not handled by the notifier unless
these are encapsulated using errno_to_notifier().

Hence the current -EINVAL is misinterpreted and converted to junk after
notifier_to_errno(), leaving the notifier subsystem to random behaviour
such as eventually allowing the cpu to go down.

Fix this by using the standard NOTIFY_BAD instead.

Signed-off-by: Li Zhong <[email protected]>
Reviewed-by: Srivatsa S. Bhat <[email protected]>
Acked-by: Steven Rostedt <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Borislav Petkov <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/time/tick-sched.c

index f4208138fbf4cd1a72791f99c31adcbea9180e3e..0cf1c14531817eacb61eae48f6f76a45a0cc8027 100644 (file)
@@ -306,7 +306,7 @@ static int __cpuinit tick_nohz_cpu_down_callback(struct notifier_block *nfb,
                 * we can't safely shutdown that CPU.
                 */
                if (have_nohz_full_mask && tick_do_timer_cpu == cpu)
-                       return -EINVAL;
+                       return NOTIFY_BAD;
                break;
        }
        return NOTIFY_OK;
This page took 0.05833 seconds and 4 git commands to generate.