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=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 9B7EFC43463 for ; Fri, 18 Sep 2020 01:05:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E8A4F2087D for ; Fri, 18 Sep 2020 01:05:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="LAR1j2h0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E8A4F2087D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 174186B0003; Thu, 17 Sep 2020 21:05:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 124C36B0055; Thu, 17 Sep 2020 21:05:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F2DE36B005A; Thu, 17 Sep 2020 21:05:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0061.hostedemail.com [216.40.44.61]) by kanga.kvack.org (Postfix) with ESMTP id D8D766B0003 for ; Thu, 17 Sep 2020 21:05:37 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 92AF7180AD81D for ; Fri, 18 Sep 2020 01:05:37 +0000 (UTC) X-FDA: 77274389514.26.wish93_150160d27127 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 67C3C1804B667 for ; Fri, 18 Sep 2020 01:05:37 +0000 (UTC) X-HE-Tag: wish93_150160d27127 X-Filterd-Recvd-Size: 4122 Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Sep 2020 01:05:36 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id m5so4249968lfp.7 for ; Thu, 17 Sep 2020 18:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=v6mUxr+o/bBCyV21PhBy9xwq4Kx+o7EoQqU8t/ozEuU=; b=LAR1j2h0gElCIkPlU8F1qMcYFmqxHfKZcMuQJTE5hBIWM/sdoqNYy6WEWnMKSyhFii DaG10gEB6IHCkFTxf7XhMBA9O1m0l7KAbS+rPt4YmT1yohTQC8dXk0Q+8tQIN+DCc3Y6 xJ3dHBzw7ljYGfemeNOEI4CHfeZdRDdNd1s2A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=v6mUxr+o/bBCyV21PhBy9xwq4Kx+o7EoQqU8t/ozEuU=; b=RdRvYSxQlglAZLg6zYjzCOxQUxzXVALP/L/bEpsLmo+UqvDVNlisPLKaHX2k7T39al Tw4FVZTas2ueLl8B/cFGts/ZaFo/7j72DOTpPcjPCay9xrxOXOe6W+e1SZgbh7Pb8799 lUvrJ0PdeLY/PU/saAyhafwQZtIkNXhAsIhqG6+MaW8vSsrxVS9oGF6fsT766IS/+hxB GavIKKcqBxpKlAGWmH0uYflVKyHkTAkc6qxWGMKIQrgpjz2+UDg4CNhlyYnZnr54o/VX qJNLeeuPkH0WkPB48E9XTgiC6iA8Y2ztYLrizqMv5t5qcI6Ab+Tbj+kpxnzvi/REf+h4 kmNA== X-Gm-Message-State: AOAM533CVOQVSffQFYRma19g6I2C8zZJehzF9XVVLu6eyYMkCmZCa7tf qCthxX+Xshy5fhDrHC5vZ1iJQscDaoNFGQ== X-Google-Smtp-Source: ABdhPJweIx/dK8litW3IywhycMmanEYdD2hIQuEs/93rHdsJTxLeqMyduM2tq0Nr9zdm8A2b28E0NQ== X-Received: by 2002:a19:404e:: with SMTP id n75mr9976822lfa.172.1600391134977; Thu, 17 Sep 2020 18:05:34 -0700 (PDT) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com. [209.85.167.53]) by smtp.gmail.com with ESMTPSA id b7sm244184lfq.36.2020.09.17.18.05.29 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 18:05:30 -0700 (PDT) Received: by mail-lf1-f53.google.com with SMTP id x77so4277697lfa.0 for ; Thu, 17 Sep 2020 18:05:29 -0700 (PDT) X-Received: by 2002:ac2:5594:: with SMTP id v20mr10817292lfg.344.1600391129661; Thu, 17 Sep 2020 18:05:29 -0700 (PDT) MIME-Version: 1.0 References: <20200917204514.GA2880159@google.com> In-Reply-To: <20200917204514.GA2880159@google.com> From: Linus Torvalds Date: Thu, 17 Sep 2020 18:05:13 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] percpu fix for v5.9-rc6 To: Dennis Zhou , "Gustavo A. R. Silva" Cc: Tejun Heo , Christoph Lameter , Linux-MM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" 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: On Thu, Sep 17, 2020 at 1:45 PM Dennis Zhou wrote: > > > 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); Hmm. Wouldn't this be cleaner as alloc_size =struct_size(chunk, populated, BITS_TO_LONGS(region_size >> PAGE_SHIFT) ); and looking at this, I realize that I thought we enabled warnings for 'sizeof()' of flexible array structures to avoid these kinds of mistakes, but that must clearly have happened only in a dream of mine. Anyway, pulled. Linus