mm/workingset.c:621 workingset_update_node() warn: unsigned '_x' is never less than zero.

Alexandre Ghiti alex at ghiti.fr
Mon Feb 17 20:55:01 PST 2025


Hi Andrew,

On 18/02/2025 05:21, Andrew Morton wrote:
> On Sun, 16 Feb 2025 03:56:06 +0800 kernel test robot <lkp at intel.com> wrote:
>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   7ff71e6d923969d933e1ba7e0db857782d36cd19
>> commit: 4715c6a753dccd15fd3a8928168f57e349205bd4 mm: cleanup WORKINGSET_NODES in workingset
>> date:   9 months ago
>> config: riscv-randconfig-r073-20250213 (https://download.01.org/0day-ci/archive/20250216/202502160323.ZLUfooA0-lkp@intel.com/config)
>> compiler: riscv32-linux-gcc (GCC) 14.2.0
>>
>> 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 at intel.com>
>> | Closes: https://lore.kernel.org/oe-kbuild-all/202502160323.ZLUfooA0-lkp@intel.com/
>>
>> New smatch warnings:
>> mm/workingset.c:621 workingset_update_node() warn: unsigned '_x' is never less than zero.
>> mm/workingset.c:746 shadow_lru_isolate() warn: unsigned '_x' is never less than zero.
>>
>> Old smatch warnings:
>> include/linux/mm.h:1306 virt_to_head_page() warn: unsigned '_x' is never less than zero.
>>
>> vim +/_x +621 mm/workingset.c
>>
>>     617	
>>     618	void workingset_update_node(struct xa_node *node)
>>     619	{
>>     620		struct address_space *mapping;
>>   > 621		struct page *page = virt_to_page(node);
> We're seeing several reports like this.  It looks like the RISC-V
> virt_to_page() (actualy __pa) implementation needs some attention.


Yes, Christoph reported the same warning yesterday, we are discussing it 
since it is probably a false-positive 
https://lore.kernel.org/linux-riscv/Z7PWuSA4jtZnxp5J@rli9-mobl/T/#t.

Thanks,

Alex


>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv



More information about the linux-riscv mailing list