From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-cys01nam02on0106.outbound.protection.outlook.com ([104.47.37.106]:1992 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755728AbeDIAgL (ORCPT ); Sun, 8 Apr 2018 20:36:11 -0400 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dan Carpenter , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , "kernel-janitors@vger.kernel.org" , Ingo Molnar , Sasha Levin Subject: [PATCH AUTOSEL for 4.4 053/162] x86/nmi: Fix timeout test in test_nmi_ipi() Date: Mon, 9 Apr 2018 00:28:20 +0000 Message-ID: <20180409002738.163941-53-alexander.levin@microsoft.com> References: <20180409002738.163941-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002738.163941-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Dan Carpenter [ Upstream commit c133c7615751008f6c32ccae7cdfc5ff6e989c35 ] 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 Signed-off-by: Sasha Levin --- arch/x86/kernel/nmi_selftest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) =20 /* Don't wait longer than a second */ timeout =3D USEC_PER_SEC; - while (!cpumask_empty(mask) && timeout--) + while (!cpumask_empty(mask) && --timeout) udelay(1); =20 /* What happens if we timeout, do we still unregister?? */ --=20 2.15.1