public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* Re: [PATCH v2 2/2] blk-mq: fix potential uaf for 'queue_hw_ctx'
       [not found] <20251127013908.66118-3-fengnanchang@gmail.com>
@ 2025-11-27 18:46 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-11-27 18:46 UTC (permalink / raw)
  To: Fengnan Chang, axboe, linux-block, ming.lei, hare, hch, yukuai3
  Cc: llvm, oe-kbuild-all, Fengnan Chang

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-11-27 18:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20251127013908.66118-3-fengnanchang@gmail.com>
2025-11-27 18:46 ` [PATCH v2 2/2] blk-mq: fix potential uaf for 'queue_hw_ctx' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox