* [hch-xfs:xfs-attr-cleanup 9/33] fs/xfs/xfs_ioctl.c:435:23: sparse: sparse: Using plain integer as NULL pointer
@ 2019-12-21 17:12 kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-21 17:12 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2142 bytes --]
tree: git://git.infradead.org/users/hch/xfs xfs-attr-cleanup
head: f239348832cf7f4f0a2ba473198bab8f9e11a0ac
commit: d1be4c1bbe9e803c792a6ac544de91e9153f2ed5 [9/33] xfs: factour out a helper for a single XFS_IOC_ATTRMULTI_BY_HANDLE op
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-129-g341daf20-dirty
git checkout d1be4c1bbe9e803c792a6ac544de91e9153f2ed5
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@intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_ioctl.c:435:23: sparse: sparse: Using plain integer as NULL pointer
vim +435 fs/xfs/xfs_ioctl.c
407
408 int
409 xfs_ioc_attrmulti_one(
410 struct file *parfilp,
411 struct inode *inode,
412 uint32_t opcode,
413 void __user *uname,
414 void __user *value,
415 uint32_t *len,
416 uint32_t flags)
417 {
418 unsigned char *name;
419 int error;
420
421 if ((flags & ATTR_ROOT) && (flags & ATTR_SECURE))
422 return -EINVAL;
423 flags &= ATTR_KERNEL_FLAGS;
424
425 name = strndup_user(uname, MAXNAMELEN);
426 if (IS_ERR(name))
427 return PTR_ERR(name);
428
429 switch (opcode) {
430 case ATTR_OP_GET:
431 error = xfs_attrmulti_attr_get(inode, name, value, len, flags);
432 break;
433 case ATTR_OP_REMOVE:
434 value = NULL;
> 435 len = 0;
436 /*FALLTHRU*/
437 case ATTR_OP_SET:
438 error = mnt_want_write_file(parfilp);
439 if (error)
440 break;
441 error = xfs_attrmulti_attr_set(inode, name, value, *len, flags);
442 mnt_drop_write_file(parfilp);
443 break;
444 default:
445 error = -EINVAL;
446 break;
447 }
448
449 kfree(name);
450 return error;
451 }
452
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
^ permalink raw reply [flat|nested] 2+ messages in thread
* [hch-xfs:xfs-attr-cleanup 9/33] fs/xfs/xfs_ioctl.c:435:23: sparse: sparse: Using plain integer as NULL pointer
@ 2019-12-16 23:02 kbuild test robot
0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2019-12-16 23:02 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]
tree: git://git.infradead.org/users/hch/xfs xfs-attr-cleanup
head: f239348832cf7f4f0a2ba473198bab8f9e11a0ac
commit: d1be4c1bbe9e803c792a6ac544de91e9153f2ed5 [9/33] xfs: factour out a helper for a single XFS_IOC_ATTRMULTI_BY_HANDLE op
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-104-gf934193-dirty
git checkout d1be4c1bbe9e803c792a6ac544de91e9153f2ed5
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@intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/xfs/xfs_ioctl.c:435:23: sparse: sparse: Using plain integer as NULL pointer
vim +435 fs/xfs/xfs_ioctl.c
407
408 int
409 xfs_ioc_attrmulti_one(
410 struct file *parfilp,
411 struct inode *inode,
412 uint32_t opcode,
413 void __user *uname,
414 void __user *value,
415 uint32_t *len,
416 uint32_t flags)
417 {
418 unsigned char *name;
419 int error;
420
421 if ((flags & ATTR_ROOT) && (flags & ATTR_SECURE))
422 return -EINVAL;
423 flags &= ATTR_KERNEL_FLAGS;
424
425 name = strndup_user(uname, MAXNAMELEN);
426 if (IS_ERR(name))
427 return PTR_ERR(name);
428
429 switch (opcode) {
430 case ATTR_OP_GET:
431 error = xfs_attrmulti_attr_get(inode, name, value, len, flags);
432 break;
433 case ATTR_OP_REMOVE:
434 value = NULL;
> 435 len = 0;
436 /*FALLTHRU*/
437 case ATTR_OP_SET:
438 error = mnt_want_write_file(parfilp);
439 if (error)
440 break;
441 error = xfs_attrmulti_attr_set(inode, name, value, *len, flags);
442 mnt_drop_write_file(parfilp);
443 break;
444 default:
445 error = -EINVAL;
446 break;
447 }
448
449 kfree(name);
450 return error;
451 }
452
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-21 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-21 17:12 [hch-xfs:xfs-attr-cleanup 9/33] fs/xfs/xfs_ioctl.c:435:23: sparse: sparse: Using plain integer as NULL pointer kbuild test robot
-- strict thread matches above, loose matches on Subject: below --
2019-12-16 23:02 kbuild test robot
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.