From: Dan Carpenter Date: Mon, 19 Jun 2017 10:53:04 +0000 (+0300) Subject: x86/nmi: Fix timeout test in test_nmi_ipi() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c133c7615751008f6c32ccae7cdfc5ff6e989c35;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git x86/nmi: Fix timeout test in test_nmi_ipi() We're supposed to exit the loop with "timeout" set to zero. Signed-off-by: Dan Carpenter Acked-by: Don Zickus Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-janitors@vger.kernel.org Fixes: 99e8b9ca90d6 ("x86, NMI: Add NMI IPI selftest") Link: http://lkml.kernel.org/r/20170619105304.GA23995@elgon.mountain Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/nmi_selftest.c b/arch/x86/kernel/nmi_selftest.c index 6d9582ec0324..d27f8d84c4ff 100644 --- a/arch/x86/kernel/nmi_selftest.c +++ b/arch/x86/kernel/nmi_selftest.c @@ -78,7 +78,7 @@ static void __init test_nmi_ipi(struct cpumask *mask) /* Don't wait longer than a second */ timeout = USEC_PER_SEC; - while (!cpumask_empty(mask) && timeout--) + while (!cpumask_empty(mask) && --timeout) udelay(1); /* What happens if we timeout, do we still unregister?? */