Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3522360pxf; Mon, 15 Mar 2021 11:25:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4Xgn0Iz+I6toeBEQNy7pmfOnCQtCsBTSXbpYg7F4vkt+HvrHBZwnWr8p+Ybu/dBVum9Bq X-Received: by 2002:a17:906:f44:: with SMTP id h4mr24627812ejj.204.1615832755326; Mon, 15 Mar 2021 11:25:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615832755; cv=none; d=google.com; s=arc-20160816; b=IrIrGc4lZQyfFPvXfDwbniF64nwc7/Xa+h2eYp9RPOAzTmWNu/NNLqYsDkunBEJkyL Tj5+Knm0id/5ZVA56N+ybdGWK7aMX3Vy9Ro/jXqtyct+rEJb2XaVixbKzePUMMhgZOWo i2HQZqhA5Zym8SQAIbHYdIA7Z9XfRU55stLE4FnMFFzix+Z4j8B+/YjhMURW+x+tR/2c KboWNPabOKHs1TnUg8CbSIOSjUJrN6ADsZ1X8whFJnYHeWT4DFCeBe37fRpqIFzMsN1l 5u4RS0e423x671OVVgoi7GYcNF9gAU8kP6K9ASZmGsrZzlCsP9thv33thf2RT33iUyc1 4Yiw== 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=Kk95DkRz0s++NosKIZwT98aaVkh3iSAUF7lXyu47M/8=; b=vVuIhslE93Gqz3Hgl1gcnH45BXJuGjNdSNu4U4BflHu3KXRhp+kbF17xSLPjujLrx8 HPlmXAfF69MvjNKY+c32tEQfDQ6/cfptNGBhtFtsrwdPx4musdkZS392SrW+2oWuT95T 5dfccuBMUE5a4VNtlLzPNCDCekvhEWHOVbiq5gm0pKp0ZJOFp4NJmqG0dhqvF/bxzH3z XZNNIzaEe5g1fREt2HYgQqiQOy2BdEjYMlkwHDf0CTIzxUGDpvu/XxKDCkrGCECz6jxr PJT058RMBO9rnx8s3M+2ikiTDV72j63aRs1db0faGv637p/vKI7VOlcrKNcKu0D3vLSZ ltPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Vd9jLNLA; 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 e7si8450893edk.222.2021.03.15.11.25.33; Mon, 15 Mar 2021 11:25:55 -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=Vd9jLNLA; 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 S238669AbhCOOXh (ORCPT + 99 others); Mon, 15 Mar 2021 10:23:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:36622 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232844AbhCOOAB (ORCPT ); Mon, 15 Mar 2021 10:00:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6DAC664F21; Mon, 15 Mar 2021 13:59:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1615816768; bh=02ckzVMLLa7/mqcJCbiSz5NJ52Ls+EyxHla1v14UTX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vd9jLNLA6d+f6dhob3+5Wfvxb7dPtPMGoZqvP0Y84afrdz0npBCZpNWfPbNpwqHTK Pq0gqB5j9uXwGL1D20AUXxQyqzBYZjn023CSWgeF8LGel7wtUqzt8kxv84U8Dfe3Yu d4z29ul3C7KR8RnIL1GiLU4OQTUyEjX+d5ommp7M= 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 4.19 055/120] s390/smp: __smp_rescan_cpus() - move cpumask away from stack Date: Mon, 15 Mar 2021 14:56:46 +0100 Message-Id: <20210315135721.787469574@linuxfoundation.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315135720.002213995@linuxfoundation.org> References: <20210315135720.002213995@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 c47bd581a08a..bce678c7179c 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c @@ -751,7 +751,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