[vfs:next-merge-candidate 54/91] init/do_mounts.c:388:30: sparse: sparse: incorrect type in argument 1 (different address spaces)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/viro/vfs.git next-merge-candidate
head:   095c2233958cdefe6f28aa1120e96f55fe9a7f46
commit: 33488845f211afcdb7e5c00a3152890e06cdc78e [54/91] constify ksys_mount() string arguments
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
        git checkout 33488845f211afcdb7e5c00a3152890e06cdc78e
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>


sparse warnings: (new ones prefixed by >>)

>> init/do_mounts.c:388:30: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *dev_name @@    got n:1> *dev_name @@
>> init/do_mounts.c:388:30: sparse:    expected char const [noderef] <asn:1> *dev_name
   init/do_mounts.c:388:30: sparse:    got char *name
>> init/do_mounts.c:388:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *dir_name @@    got n:1> *dir_name @@
>> init/do_mounts.c:388:36: sparse:    expected char const [noderef] <asn:1> *dir_name
   init/do_mounts.c:388:36: sparse:    got char *
>> init/do_mounts.c:388:45: sparse: sparse: incorrect type in argument 3 (different address spaces) @@    expected char const [noderef] <asn:1> *type @@    got n:1> *type @@
>> init/do_mounts.c:388:45: sparse:    expected char const [noderef] <asn:1> *type
   init/do_mounts.c:388:45: sparse:    got char *fs
   init/do_mounts.c:388:56: sparse: sparse: incorrect type in argument 5 (different address spaces) @@    expected void [noderef] <asn:1> *data @@    got n:1> *data @@
   init/do_mounts.c:388:56: sparse:    expected void [noderef] <asn:1> *data
   init/do_mounts.c:388:56: sparse:    got void *data
   init/do_mounts.c:392:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts.c:392:20: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts.c:392:20: sparse:    got char *
   init/do_mounts.h:19:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts.h:19:21: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts.h:19:21: sparse:    got char *name
   init/do_mounts.h:20:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts.h:20:27: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts.h:20:27: sparse:    got char *name
   init/do_mounts.c:624:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *dev_name @@    got n:1> *dev_name @@
   init/do_mounts.c:624:20: sparse:    expected char const [noderef] <asn:1> *dev_name
   init/do_mounts.c:624:20: sparse:    got char *
   init/do_mounts.c:624:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *dir_name @@    got n:1> *dir_name @@
   init/do_mounts.c:624:25: sparse:    expected char const [noderef] <asn:1> *dir_name
   init/do_mounts.c:624:25: sparse:    got char *
   init/do_mounts.c:625:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts.c:625:21: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts.c:625:21: sparse:    got char *
--
   init/do_mounts_initrd.c:52:19: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:52:19: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:52:19: sparse:    got char *
   init/do_mounts_initrd.c:56:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:56:20: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:56:20: sparse:    got char *
>> init/do_mounts_initrd.c:57:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *dev_name @@    got n:1> *dev_name @@
>> init/do_mounts_initrd.c:57:20: sparse:    expected char const [noderef] <asn:1> *dev_name
   init/do_mounts_initrd.c:57:20: sparse:    got char *
>> init/do_mounts_initrd.c:57:25: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *dir_name @@    got n:1> *dir_name @@
>> init/do_mounts_initrd.c:57:25: sparse:    expected char const [noderef] <asn:1> *dir_name
   init/do_mounts_initrd.c:57:25: sparse:    got char *
   init/do_mounts_initrd.c:58:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:58:21: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:58:21: sparse:    got char *
   init/do_mounts.h:19:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts.h:19:21: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts.h:19:21: sparse:    got char *name
   init/do_mounts.h:20:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts.h:20:27: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts.h:20:27: sparse:    got char *name
   init/do_mounts_initrd.c:74:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts_initrd.c:74:20: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts_initrd.c:74:20: sparse:    got char *
   init/do_mounts_initrd.c:75:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:75:20: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:75:20: sparse:    got char *
   init/do_mounts_initrd.c:92:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *dev_name @@    got n:1> *dev_name @@
   init/do_mounts_initrd.c:92:20: sparse:    expected char const [noderef] <asn:1> *dev_name
   init/do_mounts_initrd.c:92:20: sparse:    got char *
   init/do_mounts_initrd.c:92:26: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *dir_name @@    got n:1> *dir_name @@
   init/do_mounts_initrd.c:92:26: sparse:    expected char const [noderef] <asn:1> *dir_name
   init/do_mounts_initrd.c:92:26: sparse:    got char *
   init/do_mounts_initrd.c:94:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:94:21: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:94:21: sparse:    got char *
   init/do_mounts_initrd.c:97:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:97:28: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:97:28: sparse:    got char *
   init/do_mounts_initrd.c:101:20: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:101:20: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:101:20: sparse:    got char *
   init/do_mounts_initrd.c:106:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *dev_name @@    got n:1> *dev_name @@
   init/do_mounts_initrd.c:106:28: sparse:    expected char const [noderef] <asn:1> *dev_name
   init/do_mounts_initrd.c:106:28: sparse:    got char *
   init/do_mounts_initrd.c:106:36: sparse: sparse: incorrect type in argument 2 (different address spaces) @@    expected char const [noderef] <asn:1> *dir_name @@    got n:1> *dir_name @@
   init/do_mounts_initrd.c:106:36: sparse:    expected char const [noderef] <asn:1> *dir_name
   init/do_mounts_initrd.c:106:36: sparse:    got char *
   init/do_mounts_initrd.c:110:36: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts_initrd.c:110:36: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts_initrd.c:110:36: sparse:    got char *
   init/do_mounts_initrd.c:116:29: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char [noderef] <asn:1> *name @@    got n:1> *name @@
   init/do_mounts_initrd.c:116:29: sparse:    expected char [noderef] <asn:1> *name
   init/do_mounts_initrd.c:116:29: sparse:    got char *
   init/do_mounts.h:19:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts.h:19:21: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts.h:19:21: sparse:    got char *name
   init/do_mounts.h:20:27: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *filename @@    got n:1> *filename @@
   init/do_mounts.h:20:27: sparse:    expected char const [noderef] <asn:1> *filename
   init/do_mounts.h:20:27: sparse:    got char *name
   init/do_mounts_initrd.c:139:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts_initrd.c:139:37: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts_initrd.c:139:37: sparse:    got char *
   init/do_mounts_initrd.c:144:21: sparse: sparse: incorrect type in argument 1 (different address spaces) @@    expected char const [noderef] <asn:1> *pathname @@    got n:1> *pathname @@
   init/do_mounts_initrd.c:144:21: sparse:    expected char const [noderef] <asn:1> *pathname
   init/do_mounts_initrd.c:144:21: sparse:    got char *

vim +388 init/do_mounts.c

^1da177e4 Linus Torvalds       2005-04-16  384  
^1da177e4 Linus Torvalds       2005-04-16  385  static int __init do_mount_root(char *name, char *fs, int flags, void *data)
^1da177e4 Linus Torvalds       2005-04-16  386  {
d8c9584ea Al Viro              2011-12-07  387  	struct super_block *s;
312db1aa1 Dominik Brodowski    2018-03-11 @388  	int err = ksys_mount(name, "/root", fs, flags, data);
^1da177e4 Linus Torvalds       2005-04-16  389  	if (err)
^1da177e4 Linus Torvalds       2005-04-16  390  		return err;
^1da177e4 Linus Torvalds       2005-04-16  391  
447016e96 Dominik Brodowski    2018-03-11  392  	ksys_chdir("/root");
d8c9584ea Al Viro              2011-12-07  393  	s = current->fs->pwd.dentry->d_sb;
d8c9584ea Al Viro              2011-12-07  394  	ROOT_DEV = s->s_dev;
80cdc6dae Mandeep Singh Baines 2011-03-22  395  	printk(KERN_INFO
80cdc6dae Mandeep Singh Baines 2011-03-22  396  	       "VFS: Mounted root (%s filesystem)%s on device %u:%u.\n",
d8c9584ea Al Viro              2011-12-07  397  	       s->s_type->name,
bc98a42c1 David Howells        2017-07-17  398  	       sb_rdonly(s) ? " readonly" : "",
d8c9584ea Al Viro              2011-12-07  399  	       MAJOR(ROOT_DEV), MINOR(ROOT_DEV));
^1da177e4 Linus Torvalds       2005-04-16  400  	return 0;
^1da177e4 Linus Torvalds       2005-04-16  401  }
^1da177e4 Linus Torvalds       2005-04-16  402  

:::::: The code at line 388 was first introduced by commit
:::::: 312db1aa1dc7bff133d95c92efcc5e42b57cefa6 fs: add ksys_mount() helper; remove in-kernel calls to sys_mount()

:::::: TO: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>
:::::: CC: Dominik Brodowski <linux@xxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux