From patchwork Thu Sep 17 20:45:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dennis Zhou X-Patchwork-Id: 11783555 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64D12139A for ; Thu, 17 Sep 2020 20:45:19 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 342B22085B for ; Thu, 17 Sep 2020 20:45:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 342B22085B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4E6486B0003; Thu, 17 Sep 2020 16:45:18 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 496066B0037; Thu, 17 Sep 2020 16:45:18 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3AB1A6B0055; Thu, 17 Sep 2020 16:45:18 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0071.hostedemail.com [216.40.44.71]) by kanga.kvack.org (Postfix) with ESMTP id 24D316B0003 for ; Thu, 17 Sep 2020 16:45:18 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id DBA1D1DE0 for ; Thu, 17 Sep 2020 20:45:17 +0000 (UTC) X-FDA: 77273733474.29.ghost78_610f98627125 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin29.hostedemail.com (Postfix) with ESMTP id B4E0318086CD2 for ; Thu, 17 Sep 2020 20:45:17 +0000 (UTC) X-Spam-Summary: 1,0,0,ca07c1d63f5d9f69,d41d8cd98f00b204,dennisszhou@gmail.com,,RULES_HIT:41:69:355:379:421:973:988:989:1260:1277:1312:1313:1314:1345:1437:1516:1518:1519:1534:1541:1593:1594:1595:1596:1711:1730:1747:1777:1792:2393:2559:2562:2691:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:4321:4362:4605:5007:6261:8603:9036:9969:10004:10400:10967:11026:11232:11473:11658:11914:12043:12296:12297:12438:12517:12519:12555:12679:12683:12740:12895:13069:13071:13161:13229:13311:13357:13439:13895:14180:14181:14721:14819:21060:21080:21444:21451:21626:21740:30012:30054,0,RBL:209.85.221.196:@gmail.com:.lbl8.mailshell.net-66.100.201.100 62.18.0.100;04yr54cubbdu14ci4468gw87jjrwboc1tafttpafbfmhxwnm5qg44baf7k8xwi9.i5crdxanjhtij5rnqkq44k3jgj79tqz36gygfpaebyazps8bp4k7jepjxog1kqh.s-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: ghost78_610f98627125 X-Filterd-Recvd-Size: 3681 Received: from mail-vk1-f196.google.com (mail-vk1-f196.google.com [209.85.221.196]) by imf08.hostedemail.com (Postfix) with ESMTP for ; Thu, 17 Sep 2020 20:45:17 +0000 (UTC) Received: by mail-vk1-f196.google.com with SMTP id n193so844311vkf.12 for ; Thu, 17 Sep 2020 13:45:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=KOMGP0AY1AiXNwWcSEx/xdRLKkV1S0FOTpp6dxykL9Y=; b=J8dOjyFPIQ2mkeSWSk0f6FkGohMicfQmrJ93yyRbUV8bBVyaNXhX7SF4oxMsNcnKgJ ie41mLSr6rDyC5ieTGD85jRtyrVUd9FHoC4+3qnREUsHT/j7qnqtdsB9jyL3IqoSx5Qy PFX1H5lHTQNQlCKFfTEHAw5MeFB21Y0WGRNXt0i7JoIcYig8M1WS1pnZeSPLjsYDdI+o /IGNq6iSgl6ywHmTs8cpEEan3cypdamoR8jgUWXhLJ0mtzBPainW0SYgexglDpj1cdGU tv4ARVIqZ9CpUjKYAbboArEMePmiOP4RWPoOfKD7J/o9sKr7WyHZV36cdn2bnKsmcJB0 QTGA== X-Gm-Message-State: AOAM5306r0/HvR6xZ3v5umpBxZEHc0G2h5OwaUjaD2Iag17+mRRoMyIi uRwRoJaq0NJMDY4sJeNRbzM= X-Google-Smtp-Source: ABdhPJwYAUf2rq4aE2OsG1ltzwEma/KF0vYji20g4gZxw4N3Gg5N0MH9ul1/KZQeXstl3K2RDpq18g== X-Received: by 2002:a1f:a3cc:: with SMTP id m195mr10343933vke.16.1600375516558; Thu, 17 Sep 2020 13:45:16 -0700 (PDT) Received: from google.com (239.145.196.35.bc.googleusercontent.com. [35.196.145.239]) by smtp.gmail.com with ESMTPSA id 23sm163372vkw.25.2020.09.17.13.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Sep 2020 13:45:15 -0700 (PDT) Date: Thu, 17 Sep 2020 20:45:14 +0000 From: Dennis Zhou To: Linus Torvalds Cc: Tejun Heo , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] percpu fix for v5.9-rc6 Message-ID: <20200917204514.GA2880159@google.com> MIME-Version: 1.0 Content-Disposition: inline X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Linus, This is a fix for the first chunk size calculation where the variable length array incorrectly used # of longs instead of bytes of longs. This came in as a code fix and not a bug report, so I don't think it was widely problematic. I believe it worked out due to it being memblock memory and alignment requirements working in our favor. Thanks, Dennis The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b: Linux 5.9-rc3 (2020-08-30 16:01:54 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.9-fixes for you to fetch changes up to b3b33d3c43bbe0177d70653f4e889c78cc37f097: percpu: fix first chunk size calculation for populated bitmap (2020-09-17 17:34:39 +0000) ---------------------------------------------------------------- Sunghyun Jin (1): percpu: fix first chunk size calculation for populated bitmap mm/percpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/percpu.c b/mm/percpu.c index f4709629e6de..1ed1a349eab8 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1316,7 +1316,7 @@ static struct pcpu_chunk * __init pcpu_alloc_first_chunk(unsigned long tmp_addr, /* 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__,