From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4D7CC43466 for ; Mon, 21 Sep 2020 17:00:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CFD920C09 for ; Mon, 21 Sep 2020 17:00:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707613; bh=zNSbXnj4ZE2hh4tl2EZhVXJOsyBkfugeuXp2xHJJdEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fZaLqKuhMqY74uf93TTIUDq4aTxeFIlR42DD+seliqaeR9RZITGeO5vzUSaPRQMKh D27wFMZIvz5+KG7c3R6GanoKdMAmVGc5kC8WZ2bNucgwU2ed/eUNqtnO4vrYMEY7aQ aR9qno34I608dUJVy67vts01LfxMA73DMKgrJCms= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730354AbgIURAM (ORCPT ); Mon, 21 Sep 2020 13:00:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:43206 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728731AbgIUQk2 (ORCPT ); Mon, 21 Sep 2020 12:40:28 -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 7DC51239A1; Mon, 21 Sep 2020 16:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706428; bh=zNSbXnj4ZE2hh4tl2EZhVXJOsyBkfugeuXp2xHJJdEc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ceSJE1W+1iqHPxLGiavQejK9WYl4dKj5pegmRtlPu6nrBGOOxJ5mrDl5WJygN3BNf YUau3QaffRNeNhlmbopprV0lfOXKkCodODJU5EYLdnG1kcWMMlXIkyby5HChj/ng6a HJqJKurama1F9CAcS76aeEd0yUpcpKpIp3OhZSf0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sunghyun Jin , Dennis Zhou Subject: [PATCH 4.14 88/94] percpu: fix first chunk size calculation for populated bitmap Date: Mon, 21 Sep 2020 18:28:15 +0200 Message-Id: <20200921162039.576994609@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@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 @@ -1099,7 +1099,7 @@ static struct pcpu_chunk * __init pcpu_a /* allocate chunk */ chunk = memblock_virt_alloc(sizeof(struct pcpu_chunk) + - BITS_TO_LONGS(region_size >> PAGE_SHIFT), + BITS_TO_LONGS(region_size >> PAGE_SHIFT) * sizeof(unsigned long), 0); INIT_LIST_HEAD(&chunk->list);