* block/blk-mq.c:2334:33: sparse: sparse: Using plain integer as NULL pointer
@ 2023-12-01 16:39 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-01 16:39 UTC (permalink / raw)
To: Ming Lei
Cc: oe-kbuild-all, linux-kernel, Jens Axboe, David Jeffery,
Bart Van Assche
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@intel.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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-12-01 16:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-01 16:39 block/blk-mq.c:2334:33: sparse: sparse: Using plain integer as NULL pointer kernel 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.