Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3519475pxf; Mon, 15 Mar 2021 11:21:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxowPV9E/308xH/hG/o6ku++zBFO3DDIB4iE/i+TaidUXo8KAcV9q3nObbrI9hi4f7Cx8zE X-Received: by 2002:a17:906:d787:: with SMTP id pj7mr24659705ejb.257.1615832488939; Mon, 15 Mar 2021 11:21:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832488; cv=none; d=google.com; s=arc-20160816; b=zmk7RhDWOGa3Ji/NtF7Yt3E3OvGvcfHPBnXxOkOsR3MSFqpVawZrntKjTKdFYEKdqG DXdcpqOkMbqYcYIpUxI2mwcmW8ufL32QJnptqX5Ud9326E+kQujXlXbh+K5XuRK+o+SY eZPKzBmekK0/8blhjxsRbbW4YCWFced44yqAGv+C2AmyAM0BZ/h5z9Wn+AzKMPnLclQD cIBGlC0UmDjY8nsUPejW0t7NT/xfSEgiymlLBQ6qn3mZNGbgYJWRdqS5n7rETIDu7ok1 ABYdOpPest+s6ShWKVzyWcVwe/U+r5m7oX225i07Kye4DsiCk6M7PlexsrAY58n8x0VS sazg== 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=INpMINNVacqn04Hyqe0UeTBwP8ACWfhyALr3tNUm8Os=; b=oSmY/n6vGX8z2YlWPsQgF1MjlmZgisO53MXWKHUgskpUIM29OIe2RQ5k7m5BZ40YH1 o7EAy/b/sf6P5dEbA8XI3s8GUO0PtAkTfawlGRIpz1WKm4km1pE1lFHt7CuoxDDVkXXR SoFIC2zvkihkIDNbrny5lo+UVOEaakCI7l4iEUVfVCdQ+gviBY3BKAgv5XCGE3+lOArB KrTyRuvxiA8NOtKmcc77YdC7Pn7dUsJdQ+AnUyjw2mj8t/IW0WcsFp7QBsl50on8sT0T AfjTeKWLGtfs+QmowySFpqdYZ3LZLkqIZSIFhgo/VmdTmRWXfiANehUVNJ6+O2L+T7Et z2TQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UWP+8pfy; 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 u6si8945569ejf.56.2021.03.15.11.21.06; Mon, 15 Mar 2021 11:21:28 -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=UWP+8pfy; 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 S237535AbhCOOS1 (ORCPT + 99 others); Mon, 15 Mar 2021 10:18:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:37836 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232758AbhCON7l (ORCPT ); Mon, 15 Mar 2021 09:59:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id B493B64F3A; Mon, 15 Mar 2021 13:59:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816747; bh=HsTOAjFt0Qv3hWvDbeT7KpYR94s0MCCee9gvtc+rK34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UWP+8pfyq5dJd90el9Uyl70uWatxKlqcuDDJwEtTqljD8uWBa2OTYoDDueITwhfDx zd7LfpaZDpnjOwVSK72+8/R7WIhIKP7p4zYluIOxI4WqXqQOUN6voKH7Dpe3aR4Vb1 3zEjND29CM48qZAaK0K5uRXdLnkrfdgguLY391YQ= 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.4 083/168] s390/smp: __smp_rescan_cpus() - move cpumask away from stack Date: Mon, 15 Mar 2021 14:55:15 +0100 Message-Id: <20210315135553.113281586@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135550.333963635@linuxfoundation.org> References: <20210315135550.333963635@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 659d99af9156..8c51462f13fd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -765,7 +765,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