tree: https://gitee.com/openeuler/kernel.git OLK-5.10 head: caa1ae20bcc64a80625a9449240580f5190ed3a0 commit: 8a6bee347626968d467aef07453c4547bc23cb64 [11013/30000] blk-mq: fix potential uaf for 'queue_hw_ctx' config: x86_64-randconfig-122-20240313 (https://download.01.org/0day-ci/archive/20240314/202403140313.Qwz6h2Lt-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240314/202403140313.Qwz6h2Lt-lkp@i...)
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/202403140313.Qwz6h2Lt-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
drivers/ide/ide-io.c:456:58: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct blk_mq_hw_ctx *hctx @@ got struct blk_mq_hw_ctx [noderef] __rcu * @@
drivers/ide/ide-io.c:456:58: sparse: expected struct blk_mq_hw_ctx *hctx drivers/ide/ide-io.c:456:58: sparse: got struct blk_mq_hw_ctx [noderef] __rcu *
vim +456 drivers/ide/ide-io.c
5b31f855f10d00 Bartlomiej Zolnierkiewicz 2009-01-06 446 782b86e2656762 Jens Axboe 2011-04-05 447 void ide_requeue_and_plug(ide_drive_t *drive, struct request *rq) 782b86e2656762 Jens Axboe 2011-04-05 448 { 782b86e2656762 Jens Axboe 2011-04-05 449 struct request_queue *q = drive->queue; 782b86e2656762 Jens Axboe 2011-04-05 450 600335205b8d16 Jens Axboe 2018-10-26 451 /* Use 3ms as that was the old plug delay */ 600335205b8d16 Jens Axboe 2018-10-26 452 if (rq) { 600335205b8d16 Jens Axboe 2018-10-26 453 blk_mq_requeue_request(rq, false); 600335205b8d16 Jens Axboe 2018-10-26 454 blk_mq_delay_kick_requeue_list(q, 3); 600335205b8d16 Jens Axboe 2018-10-26 455 } else 600335205b8d16 Jens Axboe 2018-10-26 @456 blk_mq_delay_run_hw_queue(q->queue_hw_ctx[0], 3); 782b86e2656762 Jens Axboe 2011-04-05 457 } 782b86e2656762 Jens Axboe 2011-04-05 458
:::::: The code at line 456 was first introduced by commit :::::: 600335205b8d162891b5ef2e32343f5b8020efd8 ide: convert to blk-mq
:::::: TO: Jens Axboe axboe@kernel.dk :::::: CC: Jens Axboe axboe@kernel.dk