From patchwork Tue Dec 3 22:32:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 180751 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp2153995ile; Tue, 3 Dec 2019 14:48:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwcGGoRxmvd4004Y7pdIjDKI2VpuAYh23N3JydjFfl11R/djEStMUW+15ZiSco6Ge1TPw98 X-Received: by 2002:aca:1817:: with SMTP id h23mr301578oih.167.1575413298702; Tue, 03 Dec 2019 14:48:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575413298; cv=none; d=google.com; s=arc-20160816; b=qJYKNafBuhbuLE8SUHDQRSEBjsPLz17BjFezO1Ar8e/X+13FBs3IsGdO995SzKYDqL hUx1h0aD8saJUd0akE/ceX/B/ziKfMvXNOKUCqsVuysveZx6eK2PmQROAbdCL5zGhsH9 gBr9/l2k8WpBF6Xkc6N70AKLLEkpVedXmm/2wvAoJ9DbbBmd5lggJA1KAZf7Hgb1LpNa xjdiUTga6sej6G0ygdTp0rGoYwRnCwFjOUY6xagrOmwhFYB1x3PHIMDx7Gly/wjWiLYt frDsvwkYQlkSxLOUIuQZCl02f42rcdy2d6b3MEexiq4NhiziJG9mK19NoNdy9CZ2A+3r EcGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c/5fLGJT6a3VukeP0fN0nL+Ik77eZ7D7bqOtrbxUgkM=; b=VSAWZzML5aQq652rQY4HFFhPru2almhA0zZS3bjgmZQLnr/QCtw4eppv8EMeJXB1Eb 9+vjtDi4aKH4ya6tDMPAejD3iMSFAs3r3D0GJVmgIuE0EQn8BIdbOm4Tttak+3H/WBh+ 98YlZMZVPZalUkf7DwdedzRLhNy+9o1HilvE0BZsdqTOlX5L+jCvdoYj2/slRaGf+PZI kBkTABOjfuqwAknnqzbxMfJOkC+ONTgNsU19kmWGkOJlskFj4uPsmOXCusws0btGMK1J bw8mnOj7rDoKq/ybPCR0/spDmUpS1+TUMCn+/3OxuQy1+zXKJzwx2qrs8Z0pPNfgU3Ug vVjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rKULnxd0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y130si2266553oiy.28.2019.12.03.14.48.18; Tue, 03 Dec 2019 14:48:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rKULnxd0; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729283AbfLCWsR (ORCPT + 15 others); Tue, 3 Dec 2019 17:48:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:38788 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729412AbfLCWsO (ORCPT ); Tue, 3 Dec 2019 17:48:14 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 70A422080F; Tue, 3 Dec 2019 22:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575413293; bh=mlWxuW4QaOp/nmQEFoM+4MUVtpTnW56Eknmzh6voCTg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rKULnxd0zd3XF0tBQJpGb6u5yaaTzNxbbAe71kb5WgNNoi63qc71cWtlHRolyF5UX 7kZte0SZ9TixMrXWN0nwNj4IrWQEGnPX3fYnZAN3F6ajPALHP3qFnUMdt60kek8TtQ OHd5+Gq01CisHBDF038f8wJgypJS3m58/VXRstpQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve Capper , Will Deacon , Suzuki K Poulose , Sasha Levin Subject: [PATCH 4.19 072/321] arm64: smp: Handle errors reported by the firmware Date: Tue, 3 Dec 2019 23:32:18 +0100 Message-Id: <20191203223430.910289672@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191203223427.103571230@linuxfoundation.org> References: <20191203223427.103571230@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Suzuki K Poulose [ Upstream commit f357b3a7e17af7736d67d8267edc1ed3d1dd9391 ] The __cpu_up() routine ignores the errors reported by the firmware for a CPU bringup operation and looks for the error status set by the booting CPU. If the CPU never entered the kernel, we could end up in assuming stale error status, which otherwise would have been set/cleared appropriately by the booting CPU. Reported-by: Steve Capper Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 2c31d65bc541b..52aa51f6310b0 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -146,6 +146,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) } } else { pr_err("CPU%u: failed to boot: %d\n", cpu, ret); + return ret; } secondary_data.task = NULL;