lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202312021327.zVWlbqlu-lkp@intel.com>
Date:   Sun, 3 Dec 2023 14:07:04 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kent Overstreet <kmo@...erainc.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain
 integer as NULL pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   815fb87b753055df2d9e50f6cd80eb10235fe3e9
commit: 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a bcachefs: Initial commit
date:   6 weeks ago
config: hexagon-randconfig-r121-20231119 (https://download.01.org/0day-ci/archive/20231202/202312021327.zVWlbqlu-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20231202/202312021327.zVWlbqlu-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312021327.zVWlbqlu-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> fs/bcachefs/btree_cache.c:456:15: sparse: sparse: Using plain integer as NULL pointer
   fs/bcachefs/btree_cache.c:468:15: sparse: sparse: Using plain integer as NULL pointer
   fs/bcachefs/btree_cache.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
   include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
   fs/bcachefs/btree_cache.c: note: in included file (through include/linux/backing-dev-defs.h, fs/bcachefs/bcachefs.h):
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true
   include/linux/list.h:83:21: sparse: sparse: self-comparison always evaluates to true

vim +456 fs/bcachefs/btree_cache.c

   450	
   451	int bch2_btree_cache_cannibalize_lock(struct bch_fs *c, struct closure *cl)
   452	{
   453		struct btree_cache *bc = &c->btree_cache;
   454		struct task_struct *old;
   455	
 > 456		old = cmpxchg(&bc->alloc_lock, NULL, current);
   457		if (old == NULL || old == current)
   458			goto success;
   459	
   460		if (!cl) {
   461			trace_btree_node_cannibalize_lock_fail(c);
   462			return -ENOMEM;
   463		}
   464	
   465		closure_wait(&bc->alloc_wait, cl);
   466	
   467		/* Try again, after adding ourselves to waitlist */
   468		old = cmpxchg(&bc->alloc_lock, NULL, current);
   469		if (old == NULL || old == current) {
   470			/* We raced */
   471			closure_wake_up(&bc->alloc_wait);
   472			goto success;
   473		}
   474	
   475		trace_btree_node_cannibalize_lock_fail(c);
   476		return -EAGAIN;
   477	
   478	success:
   479		trace_btree_node_cannibalize_lock(c);
   480		return 0;
   481	}
   482	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ