From: Ryan Roberts <ryan.roberts@arm.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
kernel test robot <lkp@intel.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
david@redhat.com, linux-s390@vger.kernel.org
Subject: Re: [PATCH v3 08/10] mm: Convert to should_zap_page() to should_zap_folio()
Date: Mon, 22 Jan 2024 17:32:25 +0000 [thread overview]
Message-ID: <70d17161-94c2-4737-bf03-ff393e27bc49@arm.com> (raw)
In-Reply-To: <3069ea17-d470-4f02-a411-99638485c430@arm.com>
On 22/01/2024 17:19, Ryan Roberts wrote:
> On 12/01/2024 10:14, Kefeng Wang wrote:
>>
>>
>> On 2024/1/12 13:03, kernel test robot wrote:
>>> Hi Matthew,
>>>
>>> kernel test robot noticed the following build warnings:
>>>
>>> [auto build test WARNING on akpm-mm/mm-everything]
>>>
>>> url:
>>> https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/mm-Add-pfn_swap_entry_folio/20240111-232757
>>> base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
>>> patch link:
>>> https://lore.kernel.org/r/20240111152429.3374566-9-willy%40infradead.org
>>> patch subject: [PATCH v3 08/10] mm: Convert to should_zap_page() to
>>> should_zap_folio()
>>> config: arm-milbeaut_m10v_defconfig
>>> (https://download.01.org/0day-ci/archive/20240112/202401121250.A221BL2D-lkp@intel.com/config)
>>> compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git
>>> ae42196bc493ffe877a7e3dff8be32035dea4d07)
>>> reproduce (this is a W=1 build):
>>> (https://download.01.org/0day-ci/archive/20240112/202401121250.A221BL2D-lkp@intel.com/reproduce)
>>>
>>> If you fix the issue in a separate patch/commit (i.e. not just a new version of
>>> the same patch/commit), kindly add following tags
>>> | Reported-by: kernel test robot <lkp@intel.com>
>>> | Closes:
>>> https://lore.kernel.org/oe-kbuild-all/202401121250.A221BL2D-lkp@intel.com/
>>>
>>> All warnings (new ones prefixed by >>):
>>>
>>>>> mm/memory.c:1451:8: warning: variable 'folio' is used uninitialized whenever
>>>>> 'if' condition is false [-Wsometimes-uninitialized]
>>> if (page)
>>> ^~~~
>>> mm/memory.c:1454:44: note: uninitialized use occurs here
>>> if (unlikely(!should_zap_folio(details, folio)))
>>> ^~~~~
>>> include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
>>> # define unlikely(x) __builtin_expect(!!(x), 0)
>>> ^
>>> mm/memory.c:1451:4: note: remove the 'if' if its condition is always true
>>> if (page)
>>> ^~~~~~~~~
>>> mm/memory.c:1438:22: note: initialize the variable 'folio' to silence this
>>> warning
>>> struct folio *folio;
>>> ^
>>> = NULL
>>
>> Hi Andrew, please help to squash following change, thanks.
>
> I just independently found this issue during coincidental review of the code.
> It's still a problem in mm-unstable, so wondered if you missed the request, Andrew?
Sorry - please ignore this - I was confused. I see that it is infact applied to
mm-unstable.
>
>>
>> diff --git a/mm/memory.c b/mm/memory.c
>> index 998237b5600f..5e88d5379127 100644
>> --- a/mm/memory.c
>> +++ b/mm/memory.c
>> @@ -1435,7 +1435,7 @@ static unsigned long zap_pte_range(struct mmu_gather *tlb,
>> arch_enter_lazy_mmu_mode();
>> do {
>> pte_t ptent = ptep_get(pte);
>> - struct folio *folio;
>> + struct folio *folio = NULL;
>> struct page *page;
>>
>> if (pte_none(ptent))
>>
>>
>>
>
next prev parent reply other threads:[~2024-01-22 17:32 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-11 15:24 [PATCH v3 00/10] mm: convert mm counter to take a folio Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 01/10] mm: Add pfn_swap_entry_folio() Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 02/10] proc: Use pfn_swap_entry_folio where obvious Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 03/10] mprotect: Use pfn_swap_entry_folio Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 04/10] s390: use pfn_swap_entry_folio() in ptep_zap_swap_entry() Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 05/10] mm: use pfn_swap_entry_folio() in __split_huge_pmd_locked() Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 06/10] mm: use pfn_swap_entry_to_folio() in zap_huge_pmd() Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 07/10] mm: use pfn_swap_entry_folio() in copy_nonpresent_pte() Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 08/10] mm: Convert to should_zap_page() to should_zap_folio() Matthew Wilcox (Oracle)
2024-01-12 5:03 ` kernel test robot
2024-01-12 10:14 ` Kefeng Wang
2024-01-22 17:19 ` Ryan Roberts
2024-01-22 17:32 ` Ryan Roberts [this message]
2024-01-11 15:24 ` [PATCH v3 09/10] mm: convert mm_counter() to take a folio Matthew Wilcox (Oracle)
2024-01-11 15:24 ` [PATCH v3 10/10] mm: convert mm_counter_file() " Matthew Wilcox (Oracle)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70d17161-94c2-4737-bf03-ff393e27bc49@arm.com \
--to=ryan.roberts@arm.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox