tree:
https://android.googlesource.com/kernel/common android-mainline
head: e94931cb2c0ec3992df6dfe452f2145fc5ad2c74
commit: e94931cb2c0ec3992df6dfe452f2145fc5ad2c74 [5/5] ANDROID: Incremental fs: Add
INCFS_IOC_PERMIT_FILL
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-180-g0558317d-dirty
git checkout e94931cb2c0ec3992df6dfe452f2145fc5ad2c74
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(a)intel.com>
sparse warnings: (new ones prefixed by >>)
fs/incfs/vfs.c:1296:30: sparse: sparse: incorrect type in assignment (different address
spaces) @@ expected struct incfs_fill_block *usr_fill_block_array @@ got truct
incfs_fill_block *usr_fill_block_array @@
fs/incfs/vfs.c:1296:30: sparse: expected struct incfs_fill_block
*usr_fill_block_array
fs/incfs/vfs.c:1296:30: sparse: got void [noderef] <asn:1> *
fs/incfs/vfs.c:1304:70: sparse: sparse: incorrect type in argument 2 (different address
spaces) @@ expected void const [noderef] <asn:1> *from @@ got const [noderef]
<asn:1> *from @@
fs/incfs/vfs.c:1304:70: sparse: expected void const [noderef] <asn:1> *from
fs/incfs/vfs.c:1304:70: sparse: got struct incfs_fill_block *
> fs/incfs/vfs.c:1350:29: sparse: sparse: Using plain integer as
NULL pointer
vim +1350 fs/incfs/vfs.c
1344
1345 static long ioctl_permit_fill(struct file *f, void __user *arg)
1346 {
1347 struct incfs_permit_fill __user *usr_permit_fill = arg;
1348 struct incfs_permit_fill permit_fill;
1349 long error = 0;
1350 struct file *file = 0;
1351
1352 if (f->f_op != &incfs_pending_read_file_ops)
1353 return -EPERM;
1354
1355 if (copy_from_user(&permit_fill, usr_permit_fill, sizeof(permit_fill)))
1356 return -EFAULT;
1357
1358 file = fget(permit_fill.file_descriptor);
1359 if (IS_ERR(file))
1360 return PTR_ERR(file);
1361
1362 if (file->f_op != &incfs_file_ops) {
1363 error = -EPERM;
1364 goto out;
1365 }
1366
1367 if (file->f_inode->i_sb != f->f_inode->i_sb) {
1368 error = -EPERM;
1369 goto out;
1370 }
1371
1372 switch ((uintptr_t)file->private_data) {
1373 case CANT_FILL:
1374 file->private_data = (void *)CAN_FILL;
1375 break;
1376
1377 case CAN_FILL:
1378 pr_debug("CAN_FILL already set");
1379 break;
1380
1381 default:
1382 pr_warn("Invalid file private data");
1383 error = -EFAULT;
1384 goto out;
1385 }
1386
1387 out:
1388 fput(file);
1389 return error;
1390 }
1391
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org