From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A0348C43381 for ; Thu, 21 Mar 2019 07:03:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F01F218B0 for ; Thu, 21 Mar 2019 07:03:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553151812; bh=jvtWTxnSkLSjkpBQEVkyrl5c/EZWEmeVbmz16uE8yGc=; h=Subject:To:Cc:From:Date:List-ID:From; b=MueweQWX1fJmxpq8To/As6xM9b27mGllaYjm0qHwZke2WdwrPVt8gEYBAEiEHW/f/ 50wyY9eHM/fyjFRFPsouM+Xi8791fvgMlkhSuFFZ+vx9hat5AuXe2TnL4ZQNN2HSk/ KLAZWCRFloAg2exAdTucnSYfi70GLYpRaVVvrcMo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726523AbfCUHDc (ORCPT ); Thu, 21 Mar 2019 03:03:32 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:57791 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725985AbfCUHDb (ORCPT ); Thu, 21 Mar 2019 03:03:31 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3182F2082E; Thu, 21 Mar 2019 03:03:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 21 Mar 2019 03:03:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Cb+DVu BV7tqpztceWVombKDTMiJiidQHn4YAbSW8ZS8=; b=E8BQzy0yIfmI+smLOYN6wD Kj+oFyIV6toxWsmUHRckSalCq/vq+XZ5y6DR7jLwnAtc2PN5wy/cGNMjZS9RgflD LyzRdpwRpbO5GYmjaf5U08ELiLi6r1Gq9OU1iKbnlNewbbI182HDpdVgsqTCDt2o E9H2HcGb+JMHEj/UwZftl1ZBOuGt63qVTn6GRKsfcxnutGbG3oSda6lcBMxjYAl/ YTrQdm9K7gIxA5Z+UU2k5jo9iTGlQ2d14pTVusez1l8lwr6E6Hre1SEQ2C9OBycP 4oIqsVmKb7fjB+P4L7dnSwNlQbU899VcE9g31JzvE78I0VEwYR1Y5d3GUTi/n38w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrieejgddutddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (5356596b.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 328F510312; Thu, 21 Mar 2019 03:03:30 -0400 (EDT) Subject: FAILED: patch "[PATCH] powerpc/smp: Fix NMI IPI timeout" failed to apply to 4.19-stable tree To: npiggin@gmail.com, mpe@ellerman.id.au Cc: From: Date: Thu, 21 Mar 2019 08:03:28 +0100 Message-ID: <15531518084331@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.19-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 1b5fc84aba170bdfe3533396ca9662ceea1609b7 Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Mon, 26 Nov 2018 12:01:05 +1000 Subject: [PATCH] powerpc/smp: Fix NMI IPI timeout The NMI IPI timeout logic is broken, if __smp_send_nmi_ipi() times out on the first condition, delay_us will be zero which will send it into the second spin loop with no timeout so it will spin forever. Fixes: 5b73151fff63 ("powerpc: NMI IPI make NMI IPIs fully sychronous") Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c index 3f15edf25a0d..137196a4248b 100644 --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -519,7 +519,7 @@ int __smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us, bool if (delay_us) { delay_us--; if (!delay_us) - break; + goto timeout; } } @@ -530,10 +530,11 @@ int __smp_send_nmi_ipi(int cpu, void (*fn)(struct pt_regs *), u64 delay_us, bool if (delay_us) { delay_us--; if (!delay_us) - break; + goto timeout; } } +timeout: if (!cpumask_empty(&nmi_ipi_pending_mask)) { /* Timeout waiting for CPUs to call smp_handle_nmi_ipi */ ret = 0;