Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3524409pxf; Mon, 15 Mar 2021 11:28:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydmJOf6WBNyQd66hEb1CZxP3mKhL9U9+mPLkppU5Xh4ZB40suaj7fxbOU00psRKdoQLJVP X-Received: by 2002:a17:906:8614:: with SMTP id o20mr24491424ejx.386.1615832919678; Mon, 15 Mar 2021 11:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832919; cv=none; d=google.com; s=arc-20160816; b=EQeecH281qgfDUJJ2W3jHf/aSCn7SOlTgCauOEuiR1ONOLo7Kk4Ba58KeS7OUPMJfy I+eDsPz57gLXyTX6761LqwyCu+A0uEWjRY7KTQ35pvApwJ79tRVraod7nP1tZwkHxJQo eLCyq3GCXMlK4AOtHA1lztKe7sw1OZjSpibywL/3ku0D+GXXkPblnbKsdmTeGLXXf7xT CrTuPkhcv2W9tFKf8GGFiHPoXgjD8DNG82DEG2QJqVhiUIeULsLvcJvk6vCVBh6QWqCd HH1G6xvfDr5u1pJvu5v14Q1ZyUggAz3SciaOEVaKS2MKjw7vLwOtKdlRuab5NJYpdgYQ itxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FJnljTBVlaJkSCG71uEhSRztcQmDP9sF1dhafLDG0Ss=; b=0iUHn8H+tGCzhB/g7MmgKU9ty324N3GIt/qbQ3Qq+IhNJ9IgMLeDQCGNn/OwWSU2oG K9VltrkcI4sicH2o/v4AQBiU/Rj2csJ9MHDC7d4toDak+3O11Q92pGQiPewZZM//D2+S uJyBDPuEtkwgqLGpFFcIACwM2xzfG/Ws81PChRssEw+z4V4zqZSuV9L7Ve0VN9c5+O1S wOn+7EGpKB69YMqsKqFeEBSOKxCos2WJ0Dn0uTuE3DD4x59Fd7i7hraDmNFjwcEHuavY 3PomdZGHHHECwccdqoWZmcq4DtUbHszmzizSzJzoIemwjhm+CDnx9tpX5rK/rU6jT2LI YfUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZzuD3sel; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si12331689edr.434.2021.03.15.11.28.09; Mon, 15 Mar 2021 11:28:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZzuD3sel; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234579AbhCOObv (ORCPT + 99 others); Mon, 15 Mar 2021 10:31:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:35186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbhCOOBL (ORCPT ); Mon, 15 Mar 2021 10:01:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B33D64F05; Mon, 15 Mar 2021 14:00:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816842; bh=sBfa1xXJqJiwbpZyO7ATV1AkET07K3Ir9+9IWs92ug8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZzuD3selO3Agyd/y/e1Tui7XNy7H7cBt/5TYGnl+SMxgSLKQzHlQIetiv6SNUF5aY a5RTrueT65PEIfHTXzSNYUFvjj+j4s7IsMzDFFeAcqd7m4e03BBpPHou2TNqBVRAYI XW3EwJ/iTfBHBVGKLGoimM/dLK6HIpIejKjomcVU= From: gregkh@linuxfoundation.org To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Heiko Carstens , Vasily Gorbik , Sasha Levin Subject: [PATCH 5.11 157/306] s390/smp: __smp_rescan_cpus() - move cpumask away from stack Date: Mon, 15 Mar 2021 14:53:40 +0100 Message-Id: <20210315135512.937620866@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135507.611436477@linuxfoundation.org> References: <20210315135507.611436477@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman From: Heiko Carstens [ Upstream commit 62c8dca9e194326802b43c60763f856d782b225c ] Avoid a potentially large stack frame and overflow by making "cpumask_t avail" a static variable. There is no concurrent access due to the existing locking. Signed-off-by: Heiko Carstens Signed-off-by: Vasily Gorbik Signed-off-by: Sasha Levin --- arch/s390/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 27c763014114..1bae4a65416b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -770,7 +770,7 @@ static int smp_add_core(struct sclp_core_entry *core, cpumask_t *avail, static int __smp_rescan_cpus(struct sclp_core_info *info, bool early) { struct sclp_core_entry *core; - cpumask_t avail; + static cpumask_t avail; bool configured; u16 core_id; int nr, i; -- 2.30.1