From: kernel test robot <lkp@intel.com>
To: Fengnan Chang <fengnanchang@gmail.com>,
axboe@kernel.dk, linux-block@vger.kernel.org,
ming.lei@redhat.com, hare@suse.de, hch@lst.de,
yukuai3@huawei.com
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Fengnan Chang <changfengnan@bytedance.com>
Subject: Re: [PATCH v2 2/2] blk-mq: fix potential uaf for 'queue_hw_ctx'
Date: Fri, 28 Nov 2025 02:46:09 +0800 [thread overview]
Message-ID: <202511280210.BjxdaKJc-lkp@intel.com> (raw)
In-Reply-To: <20251127013908.66118-3-fengnanchang@gmail.com>
Hi Fengnan,
kernel test robot noticed the following build errors:
[auto build test ERROR on 4941a17751c99e17422be743c02c923ad706f888]
url: https://github.com/intel-lab-lkp/linux/commits/Fengnan-Chang/blk-mq-use-array-manage-hctx-map-instead-of-xarray/20251127-094243
base: 4941a17751c99e17422be743c02c923ad706f888
patch link: https://lore.kernel.org/r/20251127013908.66118-3-fengnanchang%40gmail.com
patch subject: [PATCH v2 2/2] blk-mq: fix potential uaf for 'queue_hw_ctx'
config: loongarch-allmodconfig (https://download.01.org/0day-ci/archive/20251128/202511280210.BjxdaKJc-lkp@intel.com/config)
compiler: clang version 19.1.7 (https://github.com/llvm/llvm-project cd708029e0b2869e80abe31ddb175f7c35361f90)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251128/202511280210.BjxdaKJc-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/202511280210.BjxdaKJc-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/block/rnbd/rnbd-clt.c:1324:2: error: call to undeclared function 'queue_hctx'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
1324 | queue_for_each_hw_ctx(dev->queue, hctx, i) {
| ^
include/linux/blk-mq.h:1004:17: note: expanded from macro 'queue_for_each_hw_ctx'
1004 | ({ hctx = queue_hctx((q), i); 1; }); (i)++)
| ^
>> drivers/block/rnbd/rnbd-clt.c:1324:2: error: incompatible integer to pointer conversion assigning to 'struct blk_mq_hw_ctx *' from 'int' [-Wint-conversion]
1324 | queue_for_each_hw_ctx(dev->queue, hctx, i) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/blk-mq.h:1004:15: note: expanded from macro 'queue_for_each_hw_ctx'
1004 | ({ hctx = queue_hctx((q), i); 1; }); (i)++)
| ^ ~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +/queue_hctx +1324 drivers/block/rnbd/rnbd-clt.c
f7a7a5c228d45e Jack Wang 2020-05-11 1317
f7a7a5c228d45e Jack Wang 2020-05-11 1318 static void rnbd_init_mq_hw_queues(struct rnbd_clt_dev *dev)
f7a7a5c228d45e Jack Wang 2020-05-11 1319 {
4f481208749a22 Ming Lei 2022-03-08 1320 unsigned long i;
f7a7a5c228d45e Jack Wang 2020-05-11 1321 struct blk_mq_hw_ctx *hctx;
f7a7a5c228d45e Jack Wang 2020-05-11 1322 struct rnbd_queue *q;
f7a7a5c228d45e Jack Wang 2020-05-11 1323
f7a7a5c228d45e Jack Wang 2020-05-11 @1324 queue_for_each_hw_ctx(dev->queue, hctx, i) {
f7a7a5c228d45e Jack Wang 2020-05-11 1325 q = &dev->hw_queues[i];
f7a7a5c228d45e Jack Wang 2020-05-11 1326 rnbd_init_hw_queue(dev, q, hctx);
f7a7a5c228d45e Jack Wang 2020-05-11 1327 hctx->driver_data = q;
f7a7a5c228d45e Jack Wang 2020-05-11 1328 }
f7a7a5c228d45e Jack Wang 2020-05-11 1329 }
f7a7a5c228d45e Jack Wang 2020-05-11 1330
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-11-27 18:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-27 1:39 [PATCH v2 0/2] blk-mq: use array manage hctx map instead of xarray Fengnan Chang
2025-11-27 1:39 ` [PATCH v2 1/2] " Fengnan Chang
2025-11-27 1:39 ` [PATCH v2 2/2] blk-mq: fix potential uaf for 'queue_hw_ctx' Fengnan Chang
2025-11-27 3:33 ` Ming Lei
2025-11-27 3:38 ` Ming Lei
2025-11-27 18:46 ` kernel test robot [this message]
2025-11-27 20:30 ` kernel test robot
2025-11-27 20:41 ` kernel test robot
2025-11-27 23:32 ` kernel test robot
2025-11-27 2:47 ` [PATCH v2 0/2] blk-mq: use array manage hctx map instead of xarray Jens Axboe
2025-11-27 2:55 ` fengnan chang
2025-11-27 2:49 ` Jens Axboe
2025-11-27 3:00 ` fengnan chang
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=202511280210.BjxdaKJc-lkp@intel.com \
--to=lkp@intel.com \
--cc=axboe@kernel.dk \
--cc=changfengnan@bytedance.com \
--cc=fengnanchang@gmail.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=ming.lei@redhat.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=yukuai3@huawei.com \
/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.