linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 4148/4951] fs/fcntl.c:111:13: sparse: sparse: Using plain integer as NULL pointer
@ 2024-08-15 13:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-08-15 13:11 UTC (permalink / raw)
  To: Christian Brauner
  Cc: oe-kbuild-all, Linux Memory Management List, Jeff Layton

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   edd1ec2e3a9f5de7fb267a3af73e4f00e7e052b7
commit: 0e8540d012189259261c75360d2725a2107761e7 [4148/4951] file: reclaim 24 bytes from f_owner
config: hexagon-randconfig-r123-20240814 (https://download.01.org/0day-ci/archive/20240815/202408152155.21zGGsA0-lkp@intel.com/config)
compiler: clang version 20.0.0git (https://github.com/llvm/llvm-project f86594788ce93b696675c94f54016d27a6c21d18)
reproduce: (https://download.01.org/0day-ci/archive/20240815/202408152155.21zGGsA0-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/202408152155.21zGGsA0-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/fcntl.c:111:13: sparse: sparse: Using plain integer as NULL pointer
   fs/fcntl.c:488:47: sparse: sparse: incorrect type in argument 3 (different address spaces) @@     expected struct flock [noderef] __user *user @@     got struct flock * @@
   fs/fcntl.c:488:47: sparse:     expected struct flock [noderef] __user *user
   fs/fcntl.c:488:47: sparse:     got struct flock *
   fs/fcntl.c:502:51: sparse: sparse: incorrect type in argument 4 (different address spaces) @@     expected struct flock [noderef] __user *user @@     got struct flock * @@
   fs/fcntl.c:502:51: sparse:     expected struct flock [noderef] __user *user
   fs/fcntl.c:502:51: sparse:     got struct flock *
   fs/fcntl.c:1068:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/fcntl.c:1068:9: sparse:    struct fasync_struct [noderef] __rcu *
   fs/fcntl.c:1068:9: sparse:    struct fasync_struct *
   fs/fcntl.c:1146:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/fcntl.c:1146:22: sparse:    struct fasync_struct [noderef] __rcu *
   fs/fcntl.c:1146:22: sparse:    struct fasync_struct *
   fs/fcntl.c:1157:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
   fs/fcntl.c:1157:33: sparse:    struct fasync_struct [noderef] __rcu *
   fs/fcntl.c:1157:33: sparse:    struct fasync_struct *
   fs/fcntl.c:306:9: sparse: sparse: context imbalance in 'f_getown_ex' - different lock contexts for basic block

vim +111 fs/fcntl.c

    91	
    92	/*
    93	 * Allocate an file->f_owner struct if it doesn't exist, handling racing
    94	 * allocations correctly.
    95	 */
    96	int file_f_owner_allocate(struct file *file)
    97	{
    98		struct fown_struct *f_owner;
    99	
   100		f_owner = file_f_owner(file);
   101		if (f_owner)
   102			return 0;
   103	
   104		f_owner = kzalloc(sizeof(struct fown_struct), GFP_KERNEL);
   105		if (!f_owner)
   106			return -ENOMEM;
   107	
   108		rwlock_init(&f_owner->lock);
   109		f_owner->file = file;
   110		/* If someone else raced us, drop our allocation. */
 > 111		if (unlikely(cmpxchg(&file->f_owner, NULL, f_owner)))
   112			kfree(f_owner);
   113		return 0;
   114	}
   115	EXPORT_SYMBOL(file_f_owner_allocate);
   116	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-08-15 13:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-15 13:11 [linux-next:master 4148/4951] fs/fcntl.c:111:13: sparse: sparse: Using plain integer as NULL pointer kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox