Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3290386pxk; Mon, 21 Sep 2020 09:49:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxaamiwizsPO86sUXWvy2YFInqdqr8sXQ6PoomfLN2swzoi0BcQBLftJ4FVRKgCDN91PkXC X-Received: by 2002:a17:906:838f:: with SMTP id p15mr322377ejx.315.1600706958348; Mon, 21 Sep 2020 09:49:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600706958; cv=none; d=google.com; s=arc-20160816; b=pfxXR1lW0bXAjWm5vj1O3KcSI1rMfk7SqBTLnOBa9Go2yGwfxi09D6MT2UMf8+J2rI JZRJ5qUN1Qjou+danp2mk4XCdqZDcMigZw9gQZCczK9i/9hzfQhPXjz+lqX0OnsX3248 NYe4ETAkYcd36icZL7RF8q6DfT7JLzQBKOxAtm6zyl4Kyy0MpgmF21Cr/3t1GC8djm0S OR9gnvefxygnr15FACoZVUd1oQ9W4deleQ+BxpHgkXf5zoVERC+ZtHIqaoGKHsoGsAsF F7NjpgvrNNwr+hZ6eL0qjZUbAkXvIiTZhVHi5zYewZiKnc570tbnG673uU2wWgS6rkSq ypog== 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=u7bjx4RiG0LvM2Prtmc1GBRcrr86MOMyqGfA/ynECgU=; b=pbazsfFGp/lmmKpKodPU515BwURi3A7rUObAgrEKq3UcjtQCqCpnVUAu/Mq2F2rUNK qbN0Oz3mtSqVhgKw1WJcb6KkuWRmkqjb+6XOpIk0wFj58dume7LNbjqfpy24o4+wqv7s b7oVUom0weovRmd1QxkmQnT1a2j03xm2S4byQjWUiHaVnKTzVGh0elgR8jpJo8vcTj2R DsaUWTU9PZWy1G/ZYj8y3pR6mwZsPqX2/cWRmiuChujZ5hvRn1LgXC1Xz1cwToA1tWb6 uapED4MUwlSBYmCrdIZ0W+sbwKWqo6M0dpeacMGoHvKfEjdrmi//pi3UAthbRRJuMevV 9fJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YdZYQSTM; 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=fail (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 n15si9846567eje.58.2020.09.21.09.48.55; Mon, 21 Sep 2020 09:49:18 -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=@kernel.org header.s=default header.b=YdZYQSTM; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729665AbgIUQrn (ORCPT + 99 others); Mon, 21 Sep 2020 12:47:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:54708 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729401AbgIUQrm (ORCPT ); Mon, 21 Sep 2020 12:47:42 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 56782238A1; Mon, 21 Sep 2020 16:47:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706861; bh=P/PxZeQPMHOTOkoljOroiNVXDF38g1kOW4nfT5aRXik=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YdZYQSTMJjtBZ3HMVFEX7Jun08ROCU723fd8m2rE9/sdTi0EdMxXKzvD5ZSApMkTt EnfCj+YW/09rsRzv6SOUeTfOhrwyVuARLn+vm69mc1LX29VV8G2sDoTPYVxRiUtUMQ jRIMq0UW7CUyARQPwCKcFBNsYkBpiRPK73WOfvWo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sunghyun Jin , Dennis Zhou Subject: [PATCH 5.8 095/118] percpu: fix first chunk size calculation for populated bitmap Date: Mon, 21 Sep 2020 18:28:27 +0200 Message-Id: <20200921162040.773527953@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@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: Sunghyun Jin commit b3b33d3c43bbe0177d70653f4e889c78cc37f097 upstream. Variable populated, which is a member of struct pcpu_chunk, is used as a unit of size of unsigned long. However, size of populated is miscounted. So, I fix this minor part. Fixes: 8ab16c43ea79 ("percpu: change the number of pages marked in the first_chunk pop bitmap") Cc: # 4.14+ Signed-off-by: Sunghyun Jin Signed-off-by: Dennis Zhou Signed-off-by: Greg Kroah-Hartman --- mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1300,7 +1300,7 @@ static struct pcpu_chunk * __init pcpu_a /* allocate chunk */ alloc_size = sizeof(struct pcpu_chunk) + - BITS_TO_LONGS(region_size >> PAGE_SHIFT); + BITS_TO_LONGS(region_size >> PAGE_SHIFT) * sizeof(unsigned long); chunk = memblock_alloc(alloc_size, SMP_CACHE_BYTES); if (!chunk) panic("%s: Failed to allocate %zu bytes\n", __func__,