All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 4203/4677] fs/f2fs/checkpoint.c:1851 f2fs_start_ckpt_thread() warn: passing zero to 'PTR_ERR'
@ 2021-01-20  8:14 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-01-20  8:14 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2791 bytes --]

CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm@kvack.org>
TO: Daeho Jeong <daehojeong@google.com>
CC: Jaegeuk Kim <jaegeuk@kernel.org>
CC: Sungjong Seo <sj1557.seo@samsung.com>
CC: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   647060f3b592d3c8df0c85dd887557b03e6ea897
commit: b640eda3ba7ee210865f66e06aee62d0fbb9ce51 [4203/4677] f2fs: introduce checkpoint=merge mount option
:::::: branch date: 2 hours ago
:::::: commit date: 13 hours ago
config: arm-randconfig-m031-20210119 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/f2fs/checkpoint.c:1851 f2fs_start_ckpt_thread() warn: passing zero to 'PTR_ERR'

Old smatch warnings:
fs/f2fs/f2fs.h:2227 __bitmap_ptr() warn: potential pointer math issue ('&ckpt->sit_nat_version_bitmap + offset' is a 32 bit pointer)

vim +/PTR_ERR +1851 fs/f2fs/checkpoint.c

b640eda3ba7ee210 Daeho Jeong 2021-01-19  1838  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1839  int f2fs_start_ckpt_thread(struct f2fs_sb_info *sbi)
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1840  {
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1841  	dev_t dev = sbi->sb->s_bdev->bd_dev;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1842  	struct ckpt_req_control *cprc = &sbi->cprc_info;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1843  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1844  	if (cprc->f2fs_issue_ckpt)
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1845  		return 0;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1846  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1847  	cprc->f2fs_issue_ckpt = kthread_run(issue_checkpoint_thread, sbi,
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1848  			"f2fs_ckpt-%u:%u", MAJOR(dev), MINOR(dev));
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1849  	if (IS_ERR(cprc->f2fs_issue_ckpt)) {
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1850  		cprc->f2fs_issue_ckpt = NULL;
b640eda3ba7ee210 Daeho Jeong 2021-01-19 @1851  		return PTR_ERR(cprc->f2fs_issue_ckpt);
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1852  	}
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1853  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1854  	set_task_ioprio(cprc->f2fs_issue_ckpt, DEFAULT_CHECKPOINT_IOPRIO);
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1855  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1856  	return 0;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1857  }
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1858  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30808 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [linux-next:master 4203/4677] fs/f2fs/checkpoint.c:1851 f2fs_start_ckpt_thread() warn: passing zero to 'PTR_ERR'
@ 2021-01-20  9:46 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-01-20  9:46 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2737 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git  master
head:   647060f3b592d3c8df0c85dd887557b03e6ea897
commit: b640eda3ba7ee210865f66e06aee62d0fbb9ce51 [4203/4677] f2fs: introduce checkpoint=merge mount option
config: arm-randconfig-m031-20210119 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/f2fs/checkpoint.c:1851 f2fs_start_ckpt_thread() warn: passing zero to 'PTR_ERR'

Old smatch warnings:
fs/f2fs/f2fs.h:2227 __bitmap_ptr() warn: potential pointer math issue ('&ckpt->sit_nat_version_bitmap + offset' is a 32 bit pointer)

vim +/PTR_ERR +1851 fs/f2fs/checkpoint.c

b640eda3ba7ee210 Daeho Jeong 2021-01-19  1839  int f2fs_start_ckpt_thread(struct f2fs_sb_info *sbi)
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1840  {
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1841  	dev_t dev = sbi->sb->s_bdev->bd_dev;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1842  	struct ckpt_req_control *cprc = &sbi->cprc_info;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1843  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1844  	if (cprc->f2fs_issue_ckpt)
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1845  		return 0;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1846  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1847  	cprc->f2fs_issue_ckpt = kthread_run(issue_checkpoint_thread, sbi,
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1848  			"f2fs_ckpt-%u:%u", MAJOR(dev), MINOR(dev));
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1849  	if (IS_ERR(cprc->f2fs_issue_ckpt)) {
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1850  		cprc->f2fs_issue_ckpt = NULL;
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

b640eda3ba7ee210 Daeho Jeong 2021-01-19 @1851  		return PTR_ERR(cprc->f2fs_issue_ckpt);
                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
returning PTR_ERR(NULL) is success.

b640eda3ba7ee210 Daeho Jeong 2021-01-19  1852  	}
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1853  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1854  	set_task_ioprio(cprc->f2fs_issue_ckpt, DEFAULT_CHECKPOINT_IOPRIO);
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1855  
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1856  	return 0;
b640eda3ba7ee210 Daeho Jeong 2021-01-19  1857  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org 

_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 30808 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-20  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-20  8:14 [linux-next:master 4203/4677] fs/f2fs/checkpoint.c:1851 f2fs_start_ckpt_thread() warn: passing zero to 'PTR_ERR' kernel test robot
2021-01-20  9:46 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.