From: kernel test robot <lkp@intel.com>
To: Ming Lei <ming.lei@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Jens Axboe <axboe@kernel.dk>, David Jeffery <djeffery@redhat.com>,
Bart Van Assche <bvanassche@acm.org>
Subject: block/blk-mq.c:2334:33: sparse: sparse: Using plain integer as NULL pointer
Date: Sat, 2 Dec 2023 00:39:27 +0800 [thread overview]
Message-ID: <202312020005.Avlspwql-lkp@intel.com> (raw)
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
reply other threads:[~2023-12-01 16:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312020005.Avlspwql-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=djeffery@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.