From patchwork Mon May 9 12:32:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 12843482 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1276C433F5 for ; Mon, 9 May 2022 12:32:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 49FA46B0071; Mon, 9 May 2022 08:32:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4500D6B0073; Mon, 9 May 2022 08:32:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F05A6B0074; Mon, 9 May 2022 08:32:42 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 21D3F6B0071 for ; Mon, 9 May 2022 08:32:42 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0263730B02 for ; Mon, 9 May 2022 12:32:41 +0000 (UTC) X-FDA: 79446143364.11.4B2F46A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 43791C0086 for ; Mon, 9 May 2022 12:32:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652099560; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YyVeP8FyL2hyCQ2N083n40aBu6xoSDc160MDLkcNums=; b=GdV4tXdlRaPIiZWmGFrh/2zkpQuO+FSIRF4hM2VE6rPn4g08Rp3DhdzvY6tqZD4ZkYXb3m d2pK2k4AQ6JK0/OaN5Ae9a9NktcAK9LwW9DBKR5jmGV2jqcAhRKE+YN/C6QIPVkhCNF/i1 24WGDqle/locqQHiGMiOaYmSCOsHtEI= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-496-4Pd932rJO-2H1Qw3bUfuLg-1; Mon, 09 May 2022 08:32:37 -0400 X-MC-Unique: 4Pd932rJO-2H1Qw3bUfuLg-1 Received: by mail-qk1-f200.google.com with SMTP id 66-20020a370345000000b0069fcc5f6ac4so8486403qkd.19 for ; Mon, 09 May 2022 05:32:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YyVeP8FyL2hyCQ2N083n40aBu6xoSDc160MDLkcNums=; b=V3vvaktobtYFXiyCtWoWVZdi1h9cu0XYcnncaQe/Cg4jP/3STaIpYDXCgctR+WI5tn pivIfT0++ANIXDJMOJbU2uPZRgZvPvglFRl2/aJI/4RuCRow90YGxnNjCZeUkWyWkCT8 nqt+5BmGn1DSBGXu2cyxF3zqRTt9ZM1IkZs9BtXZwsm2fxI1h2gp5XLIYE/fWpNlB9ny YM8mAVC3gt5blMqvgCVlFnqROn7Pek8wC4ooHTiuGbgvVJLLsYGphYId8NW/zbYuAUoH fT3EMcKFfUveHzbbEnrebihIonEU1L6CtoqmNohGk/d+pYRTvQEG2tsBEFnEGOn4XZZn hbhg== X-Gm-Message-State: AOAM533bPKJoslMWl0LDNrQn5iwzTMlVsPfOimZgmqLio0l1m13FtFEy EUm+1YSrjN4ZghVBfk7GHVZjekU0Tg71rG+WFA2oCpnJudjXi4f+c2LeLe7KH2CLj+Uht28FFKf YMuvSc5bl9Jc= X-Received: by 2002:a05:6214:3012:b0:45a:afde:568b with SMTP id ke18-20020a056214301200b0045aafde568bmr12922420qvb.2.1652099556892; Mon, 09 May 2022 05:32:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR0DnU583XohtUlCS3huesd3t60jnAeqmFyQSwk+kv9UkI5PNlzULAHfpsImS/2Qvu9b+YRQ== X-Received: by 2002:a05:6214:3012:b0:45a:afde:568b with SMTP id ke18-20020a056214301200b0045aafde568bmr12922403qvb.2.1652099556686; Mon, 09 May 2022 05:32:36 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id t134-20020a37aa8c000000b0069fc13ce23bsm6818499qke.108.2022.05.09.05.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 05:32:36 -0700 (PDT) From: Tom Rix To: hughd@google.com, akpm@linux-foundation.org, nathan@kernel.org, ndesaulniers@google.com, willy@infradead.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] mm/shmem: restore setting of page variable Date: Mon, 9 May 2022 08:32:32 -0400 Message-Id: <20220509123232.3428667-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: dncb59setxnnj1papk3p193ncy1oqxam X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 43791C0086 X-Rspam-User: Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=GdV4tXdl; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf28.hostedemail.com: domain of trix@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=trix@redhat.com X-HE-Tag: 1652099543-450467 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: The clang build fails with mm/shmem.c:2337:8: error: variable 'page' is uninitialized when used here [-Werror,-Wuninitialized] if (!page) ^~~~ In the commit listed in the fixes, there was a change to the from page = shmem_alloc_page(..); to page = &shmem_alloc_folio(..)->page; But in this case, instead of replacing, the setting of page was deleted. So restore page with its new api. Fixes: b0bb08b2d5f3 ("mm/shmem: turn shmem_alloc_page() into shmem_alloc_folio()") Signed-off-by: Tom Rix --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/shmem.c b/mm/shmem.c index 7faaa61ff7fa..a2234f19b711 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -2334,6 +2334,7 @@ int shmem_mfill_atomic_pte(struct mm_struct *dst_mm, if (!*pagep) { ret = -ENOMEM; + page = &shmem_alloc_folio(gfp, info, pgoff)->page; if (!page) goto out_unacct_blocks;