Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3525166pxf; Mon, 15 Mar 2021 11:29:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU2mz+N2BZhPyzx1x0QqNKYl36xzcNNCLYD6a//DXUJO76UKE6V9xUENMHV53TSqh/AHNN X-Received: by 2002:aa7:d347:: with SMTP id m7mr30851116edr.260.1615832981076; Mon, 15 Mar 2021 11:29:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832981; cv=none; d=google.com; s=arc-20160816; b=OXC28FKJ6Ie3sfE6ZIo2YikOxm7Z7VIp9+qpgVr5S8Ni4RayOpf1zC+6H9SBeig8Gn QNxxEDJ+auuf/JIaZ3NuIFB7HgI42ZAToBBwKmiuJrUw1DhtcwgYHdHFqgIy0ro1pcKK Tgosp+tPxD/AYCaoTFrIHuobJ5fvvNHq1eX6UBfkf0QMNLPr1GojLyxd+HIeHH5LsvP2 +D6fmBhArtv0qSGucyBr/s58L3twnh1PNnm20ddu5YKIT14W6wPC3wpw/xCmGFpKTWmL QVicADr7f0hfoqWvEnNoaLdMRFcVNTePsDSgbb/7HJZ03F4JV0bXWgJ0B2xfXunODo4f 5uDg== 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=pC88HmaeEOKJO48vJTDAqHT40dwzve2S4/v45yrnA2g=; b=LlcxC9ssvkERPxk6UbKZmKT+vrtf9Q7z8KMy+ymDnOokgQGcsM5GhvogwRONYtMJno y5KVjxf1Ochy+Pq/dGcCrv0NvEEwq3PKuBwIdZgPxwmr69+/BDdqauvj9cfazOp2mblz uROI7dZiB1APz73q8jOwzGjrtbQLSnNPOOSIDnmSNPZM5Szm/rU1F5kNb2RsUa44eodk ZJJ3uiGTIsZgs5biZSOpk8XlOkPQkLZozcjoUfZM6dSr0FQ8az2NpMKe6Qnd/7CSC05f ZXLF4adbFplYjyktKZ9FpenX95+P42VuVwhROTaIytpWOFrttdn06TLJONMUm2kR3Rec JyCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lQDqLnBU; 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 o16si11671241ejb.259.2021.03.15.11.29.13; Mon, 15 Mar 2021 11:29:41 -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=lQDqLnBU; 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 S233239AbhCOOdy (ORCPT + 99 others); Mon, 15 Mar 2021 10:33:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:37540 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbhCOOBh (ORCPT ); Mon, 15 Mar 2021 10:01:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 63B9764FC0; Mon, 15 Mar 2021 14:01:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816867; bh=MhuxdJGA/iHLtYvIfq5Z8fSG7I/IPtnSqScMjtv/Jpk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lQDqLnBUdmiTfJ/OQMQOc9e5ItYdFMq4l3sdMUcGHGTlAb29M3GnbFepRnu8UBWRI G1ee9jlXKf7OvuDN75iGLVEDA3TmaRLa3BTeHE4/d8SWnviZhdi5exLCJVlkEPYgmx b2I1CkbjQXKnwh1+E+eNGwHrKLJztz19atJBusDY= 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.10 160/290] s390/smp: __smp_rescan_cpus() - move cpumask away from stack Date: Mon, 15 Mar 2021 14:54:13 +0100 Message-Id: <20210315135547.312229029@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135541.921894249@linuxfoundation.org> References: <20210315135541.921894249@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 3a0d545f0ce8..791bc373418b 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -775,7 +775,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