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: <202312020005.Avlspwql-lkp@intel.com>
Date:   Sat, 2 Dec 2023 00:39:27 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ming Lei <ming.lei@...hat.com>
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>,
        David Jeffery <djeffery@...hat.com>,
        Bart Van Assche <bvanassche@....org>
Subject: block/blk-mq.c:2334:33: sparse: sparse: Using plain integer as NULL
 pointer

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   994d5c58e50e91bb02c7be4a91d5186292a895c8
commit: bd63141d585bef14f4caf111f6d0e27fe2300ec6 blk-mq: clear stale request in tags->rq[] before freeing one request pool
date:   2 years, 6 months ago
config: hexagon-randconfig-r121-20231119 (https://download.01.org/0day-ci/archive/20231202/202312020005.Avlspwql-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/202312020005.Avlspwql-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/202312020005.Avlspwql-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> block/blk-mq.c:2334:33: sparse: sparse: Using plain integer as NULL pointer

vim +2334 block/blk-mq.c

  2314	
  2315	/* called before freeing request pool in @tags */
  2316	static void blk_mq_clear_rq_mapping(struct blk_mq_tag_set *set,
  2317			struct blk_mq_tags *tags, unsigned int hctx_idx)
  2318	{
  2319		struct blk_mq_tags *drv_tags = set->tags[hctx_idx];
  2320		struct page *page;
  2321		unsigned long flags;
  2322	
  2323		list_for_each_entry(page, &tags->page_list, lru) {
  2324			unsigned long start = (unsigned long)page_address(page);
  2325			unsigned long end = start + order_to_size(page->private);
  2326			int i;
  2327	
  2328			for (i = 0; i < set->queue_depth; i++) {
  2329				struct request *rq = drv_tags->rqs[i];
  2330				unsigned long rq_addr = (unsigned long)rq;
  2331	
  2332				if (rq_addr >= start && rq_addr < end) {
  2333					WARN_ON_ONCE(refcount_read(&rq->ref) != 0);
> 2334					cmpxchg(&drv_tags->rqs[i], rq, NULL);
  2335				}
  2336			}
  2337		}
  2338	
  2339		/*
  2340		 * Wait until all pending iteration is done.
  2341		 *
  2342		 * Request reference is cleared and it is guaranteed to be observed
  2343		 * after the ->lock is released.
  2344		 */
  2345		spin_lock_irqsave(&drv_tags->lock, flags);
  2346		spin_unlock_irqrestore(&drv_tags->lock, flags);
  2347	}
  2348	

-- 
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