All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] block: fix lock dependency between percpu alloc lock and elevator lock
Date: Wed, 21 May 2025 11:34:39 +0800	[thread overview]
Message-ID: <202505211110.xlMp4URV-lkp@intel.com> (raw)

BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20250520103425.1259712-1-nilay@linux.ibm.com>
References: <20250520103425.1259712-1-nilay@linux.ibm.com>
TO: Nilay Shroff <nilay@linux.ibm.com>
TO: linux-block@vger.kernel.org
CC: ming.lei@redhat.com
CC: hch@lst.de
CC: axboe@kernel.dk
CC: sth@linux.ibm.com
CC: gjoyce@ibm.com

Hi Nilay,

kernel test robot noticed the following build warnings:

[auto build test WARNING on axboe-block/for-next]
[also build test WARNING on next-20250516]
[cannot apply to linus/master v6.15-rc7]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Nilay-Shroff/block-fix-lock-dependency-between-percpu-alloc-lock-and-elevator-lock/20250520-183641
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next
patch link:    https://lore.kernel.org/r/20250520103425.1259712-1-nilay%40linux.ibm.com
patch subject: [PATCH] block: fix lock dependency between percpu alloc lock and elevator lock
:::::: branch date: 17 hours ago
:::::: commit date: 17 hours ago
config: powerpc64-randconfig-r072-20250521 (https://download.01.org/0day-ci/archive/20250521/202505211110.xlMp4URV-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)

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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202505211110.xlMp4URV-lkp@intel.com/

New smatch warnings:
block/blk-mq-sched.c:406 blk_mq_sched_tags_release() warn: iterator 'i' not incremented
block/blk-mq-sched.c:611 blk_mq_sched_copy_tags() warn: iterator 'i' not incremented

Old smatch warnings:
block/blk-mq-sched.c:434 blk_mq_sched_reg_debugfs() warn: iterator 'i' not incremented
block/blk-mq-sched.c:445 blk_mq_sched_unreg_debugfs() warn: iterator 'i' not incremented
block/blk-mq-sched.c:572 blk_mq_init_sched() warn: iterator 'i' not incremented
block/blk-mq-sched.c:621 blk_mq_exit_sched() warn: iterator 'i' not incremented

vim +/i +406 block/blk-mq-sched.c

bd166ef183c263 Jens Axboe   2017-01-17  395  
cc96aa538d1d8f Nilay Shroff 2025-05-20  396  /*
cc96aa538d1d8f Nilay Shroff 2025-05-20  397   * Called in queue's release handler, tagset has gone away. Sched tags
cc96aa538d1d8f Nilay Shroff 2025-05-20  398   * are freed later when we finish switching the elevator and release
cc96aa538d1d8f Nilay Shroff 2025-05-20  399   * the ->elevator_lock and ->frezze_lock.
cc96aa538d1d8f Nilay Shroff 2025-05-20  400   */
cc96aa538d1d8f Nilay Shroff 2025-05-20  401  static void blk_mq_sched_tags_release(struct request_queue *q, unsigned int flags)
bd166ef183c263 Jens Axboe   2017-01-17  402  {
bd166ef183c263 Jens Axboe   2017-01-17  403  	struct blk_mq_hw_ctx *hctx;
4f481208749a22 Ming Lei     2022-03-08  404  	unsigned long i;
bd166ef183c263 Jens Axboe   2017-01-17  405  
cc96aa538d1d8f Nilay Shroff 2025-05-20 @406  	queue_for_each_hw_ctx(q, hctx, i)
c3e2219216c929 Ming Lei     2019-06-04  407  		hctx->sched_tags = NULL;
e155b0c238b20f John Garry   2021-10-05  408  
079a2e3e862548 John Garry   2021-10-05  409  	if (blk_mq_is_shared_tags(flags))
cc96aa538d1d8f Nilay Shroff 2025-05-20  410  		q->sched_shared_tags = NULL;
bd166ef183c263 Jens Axboe   2017-01-17  411  }
cc96aa538d1d8f Nilay Shroff 2025-05-20  412  static int blk_mq_init_sched_shared_tags(struct request_queue *queue,
cc96aa538d1d8f Nilay Shroff 2025-05-20  413  		struct elv_data *elv)
d97e594c51660b John Garry   2021-05-13  414  {
d97e594c51660b John Garry   2021-05-13  415  	/*
cc96aa538d1d8f Nilay Shroff 2025-05-20  416  	 * We allocated the sched shared tags before initiating the elevator
cc96aa538d1d8f Nilay Shroff 2025-05-20  417  	 * switch, prior to acquiring ->elevator_lock and ->freeze_lock, and
cc96aa538d1d8f Nilay Shroff 2025-05-20  418  	 * stored them in the elevator context. So assign those pre-allocated
cc96aa538d1d8f Nilay Shroff 2025-05-20  419  	 * tags now.
d97e594c51660b John Garry   2021-05-13  420  	 */
cc96aa538d1d8f Nilay Shroff 2025-05-20  421  	queue->sched_shared_tags = elv->shared_tags;
079a2e3e862548 John Garry   2021-10-05  422  	blk_mq_tag_update_sched_shared_tags(queue);
d97e594c51660b John Garry   2021-05-13  423  
d97e594c51660b John Garry   2021-05-13  424  	return 0;
d97e594c51660b John Garry   2021-05-13  425  }
d97e594c51660b John Garry   2021-05-13  426  

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

             reply	other threads:[~2025-05-21  3:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21  3:34 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-20 10:33 [PATCH] block: fix lock dependency between percpu alloc lock and elevator lock Nilay Shroff
2025-05-21  4:08 ` Ming Lei
2025-05-21  6:03   ` Christoph Hellwig
2025-05-21  7:40   ` Nilay Shroff

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=202505211110.xlMp4URV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=error27@gmail.com \
    --cc=oe-kbuild@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.