* mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
@ 2023-11-07 16:29 kernel test robot
2023-11-07 22:02 ` Nhat Pham
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-11-07 16:29 UTC (permalink / raw)
To: Nhat Pham
Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff
commit: cf264e1329fb0307e044f7675849f9f38b44c11a cachestat: implement cachestat syscall
date: 5 months ago
config: s390-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231108/202311080014.GABRIG2T-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231108/202311080014.GABRIG2T-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/202311080014.GABRIG2T-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
mm/filemap.c:1416:17: sparse: sparse: context imbalance in 'migration_entry_wait_on_locked' - unexpected unlock
>> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
>> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
>> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
>> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
vim +4249 mm/filemap.c
4214
4215 /*
4216 * The cachestat(2) system call.
4217 *
4218 * cachestat() returns the page cache statistics of a file in the
4219 * bytes range specified by `off` and `len`: number of cached pages,
4220 * number of dirty pages, number of pages marked for writeback,
4221 * number of evicted pages, and number of recently evicted pages.
4222 *
4223 * An evicted page is a page that is previously in the page cache
4224 * but has been evicted since. A page is recently evicted if its last
4225 * eviction was recent enough that its reentry to the cache would
4226 * indicate that it is actively being used by the system, and that
4227 * there is memory pressure on the system.
4228 *
4229 * `off` and `len` must be non-negative integers. If `len` > 0,
4230 * the queried range is [`off`, `off` + `len`]. If `len` == 0,
4231 * we will query in the range from `off` to the end of the file.
4232 *
4233 * The `flags` argument is unused for now, but is included for future
4234 * extensibility. User should pass 0 (i.e no flag specified).
4235 *
4236 * Currently, hugetlbfs is not supported.
4237 *
4238 * Because the status of a page can change after cachestat() checks it
4239 * but before it returns to the application, the returned values may
4240 * contain stale information.
4241 *
4242 * return values:
4243 * zero - success
4244 * -EFAULT - cstat or cstat_range points to an illegal address
4245 * -EINVAL - invalid flags
4246 * -EBADF - invalid file descriptor
4247 * -EOPNOTSUPP - file descriptor is of a hugetlbfs file
4248 */
> 4249 SYSCALL_DEFINE4(cachestat, unsigned int, fd,
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
2023-11-07 16:29 mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer kernel test robot
@ 2023-11-07 22:02 ` Nhat Pham
0 siblings, 0 replies; 2+ messages in thread
From: Nhat Pham @ 2023-11-07 22:02 UTC (permalink / raw)
To: kernel test robot
Cc: oe-kbuild-all, linux-kernel, Andrew Morton, Linux Memory Management List
On Tue, Nov 7, 2023 at 8:30 AM kernel test robot <lkp@intel.com> wrote:
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: be3ca57cfb777ad820c6659d52e60bbdd36bf5ff
> commit: cf264e1329fb0307e044f7675849f9f38b44c11a cachestat: implement cachestat syscall
> date: 5 months ago
> config: s390-randconfig-r123-20231107 (https://download.01.org/0day-ci/archive/20231108/202311080014.GABRIG2T-lkp@intel.com/config)
> compiler: s390-linux-gcc (GCC) 13.2.0
> reproduce: (https://download.01.org/0day-ci/archive/20231108/202311080014.GABRIG2T-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/202311080014.GABRIG2T-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
> mm/filemap.c:1416:17: sparse: sparse: context imbalance in 'migration_entry_wait_on_locked' - unexpected unlock
> >> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
> >> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
> >> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
> >> mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer
>
> vim +4249 mm/filemap.c
>
> 4214
> 4215 /*
> 4216 * The cachestat(2) system call.
> 4217 *
> 4218 * cachestat() returns the page cache statistics of a file in the
> 4219 * bytes range specified by `off` and `len`: number of cached pages,
> 4220 * number of dirty pages, number of pages marked for writeback,
> 4221 * number of evicted pages, and number of recently evicted pages.
> 4222 *
> 4223 * An evicted page is a page that is previously in the page cache
> 4224 * but has been evicted since. A page is recently evicted if its last
> 4225 * eviction was recent enough that its reentry to the cache would
> 4226 * indicate that it is actively being used by the system, and that
> 4227 * there is memory pressure on the system.
> 4228 *
> 4229 * `off` and `len` must be non-negative integers. If `len` > 0,
> 4230 * the queried range is [`off`, `off` + `len`]. If `len` == 0,
> 4231 * we will query in the range from `off` to the end of the file.
> 4232 *
> 4233 * The `flags` argument is unused for now, but is included for future
> 4234 * extensibility. User should pass 0 (i.e no flag specified).
> 4235 *
> 4236 * Currently, hugetlbfs is not supported.
> 4237 *
> 4238 * Because the status of a page can change after cachestat() checks it
> 4239 * but before it returns to the application, the returned values may
> 4240 * contain stale information.
> 4241 *
> 4242 * return values:
> 4243 * zero - success
> 4244 * -EFAULT - cstat or cstat_range points to an illegal address
> 4245 * -EINVAL - invalid flags
> 4246 * -EBADF - invalid file descriptor
> 4247 * -EOPNOTSUPP - file descriptor is of a hugetlbfs file
> 4248 */
> > 4249 SYSCALL_DEFINE4(cachestat, unsigned int, fd,
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
This is a known false positive with s390. See this thread:
https://lore.kernel.org/linux-mm/202305070840.X0G3ofjl-lkp@intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-11-07 22:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 16:29 mm/filemap.c:4249:1: sparse: sparse: Using plain integer as NULL pointer kernel test robot
2023-11-07 22:02 ` Nhat Pham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox