[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s47y6ysj4c2z5c5axtxbeset4divigctg4s3p7gbgmvfkoizeu@malcpodvrm46>
Date: Tue, 13 Jan 2026 13:24:20 +0100
From: Jan Kara <jack@...e.cz>
To: Dan Carpenter <dan.carpenter@...aro.org>
Cc: oe-kbuild@...ts.linux.dev, Roman Gushchin <roman.gushchin@...ux.dev>,
lkp@...el.com, oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>, Linux Memory Management List <linux-mm@...ck.org>,
Dev Jain <dev.jain@....com>, Jan Kara <jack@...e.cz>
Subject: Re: mm/filemap.c:3307 do_sync_mmap_readahead() warn: assigning (-12)
to unsigned variable 'ra->order'
On Tue 13-01-26 14:12:28, Dan Carpenter wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: b71e635feefc852405b14620a7fc58c4c80c0f73
> commit: 9f1edf1aedac1b287355f63f768ba4275de72dca mm: readahead: make thp readahead conditional to mmap_miss logic
> config: x86_64-randconfig-161-20260113 (https://download.01.org/0day-ci/archive/20260113/202601131311.g3lyUAks-lkp@intel.com/config)
> compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
> smatch version: v0.5.0-8985-g2614ff1a
>
> 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@...el.com>
> | Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> | Closes: https://lore.kernel.org/r/202601131311.g3lyUAks-lkp@intel.com/
>
> smatch warnings:
> mm/filemap.c:3307 do_sync_mmap_readahead() warn: assigning (-12) to unsigned variable 'ra->order'
...
> 9f1edf1aedac1b2 Roman Gushchin 2025-10-06 3306 ra->async_size = HPAGE_PMD_NR;
> 9f1edf1aedac1b2 Roman Gushchin 2025-10-06 @3307 ra->order = HPAGE_PMD_ORDER;
>
> HPAGE_PMD_SHIFT is zero in this config?
> ra->order is a u16.
What's the config exactly? I suppose CONFIG_TRANSPARENT_HUGEPAGE is
disabled in this case, isn't it? In that case force_thp_readahead will
never be true and thus the branch with the assignment can never be reached
AFAICT...
Honza
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists