Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3298880pxk; Mon, 21 Sep 2020 10:01:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytGPNNrIzpMJkAyXhl2z0Zy3QMKtkZXAyLVvSWJhU0KjsIf+M3S4ZFAuJ4qrenJ6t1WzDx X-Received: by 2002:a17:906:c1c3:: with SMTP id bw3mr393913ejb.516.1600707702029; Mon, 21 Sep 2020 10:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707702; cv=none; d=google.com; s=arc-20160816; b=aCkap97mz1pVwnmzAMGdji3AvRHUOGPmMmhRgOc9fTGkikI+fJuJU8dFZLeLq0/uCz hGnjR/dIHl4xqUWo37QAmN84fFeUV6ecd3DHq1GYKVrryy4Xbd3dz8tF65T9beT19i80 QL8A2PiCBfyF7/tHkfi6ZdTrPtszOAhfOOC9zec5JmyTZfJWpvEoBdbm/yj+WZaBsmjm 5+h7YeEx8t7FhYanXGps9poNFGvPTOdHQoOHRk6V68gaRoQ/k/HKuzsVbJZnCEYDsIVy VBUbCs38f1uQWUMYPsretb1oMcXUOWm42xTwKvDkJKkgbQXnFPCpvY1FOXsR5LhU/+rD dlPA== 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=slzHD2p3FBOvzy/WKaJjx/UKvEPxkLyaB7vFhu0QM/s=; b=YHhDRzhLm+Fg14tiEbYzDbAaiSmm7h3m1V473lcNvS8a35oY+j2/erVIGg9BHaOTbL PcIzWIzWlvP6/6U6o/e6yPSbZHvP6WmB8B+/s8kh8BCxhkfa3ueXVqPuUHaKca//lhyS jV6CnG7yyQ0Qk6F0CBXe5b+zikfsaF5fcD2QYtPrez5SNM78zkiwfq2G2wT+3pfDaBqM wbfKF+l8A07gQgTchGD1LZ9LL5hN7OVHprtDI7xsiqpHaQ9yD7Ba/1kDBPddABEFwH7Z q6JNChRMlewOpUrTCp0tX7pAk+ipe5Kfzc6M0ou3TPK64I9HhXvN/w9Ve/1aKpeYV392 XXlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ceSJE1W+; 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 v11si8206863edr.99.2020.09.21.10.01.17; Mon, 21 Sep 2020 10:01:42 -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=ceSJE1W+; 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 S1730351AbgIURAL (ORCPT + 99 others); Mon, 21 Sep 2020 13:00:11 -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);