tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 6906a84c482f098d31486df8dc98cead21cce2d0 commit: 611d5cbc0b35a752e657a83eebadf40d814d006b [4403/5501] md: fix deadlock between mddev_suspend and flush bio config: x86_64-randconfig-101-20240618 (https://download.01.org/0day-ci/archive/20240618/202406180407.xZHCKGBJ-lkp@xxxxxxxxx/config) compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0 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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202406180407.xZHCKGBJ-lkp@xxxxxxxxx/ cocci warnings: (new ones prefixed by >>) >> drivers/md/md.c:620:21-22: Unneeded semicolon vim +620 drivers/md/md.c 588 589 static void md_submit_flush_data(struct work_struct *ws) 590 { 591 struct mddev *mddev = container_of(ws, struct mddev, flush_work); 592 struct bio *bio = mddev->flush_bio; 593 594 /* 595 * must reset flush_bio before calling into md_handle_request to avoid a 596 * deadlock, because other bios passed md_handle_request suspend check 597 * could wait for this and below md_handle_request could wait for those 598 * bios because of suspend check 599 */ 600 spin_lock_irq(&mddev->lock); 601 mddev->prev_flush_start = mddev->start_flush; 602 mddev->flush_bio = NULL; 603 spin_unlock_irq(&mddev->lock); 604 wake_up(&mddev->sb_wait); 605 606 if (bio->bi_iter.bi_size == 0) { 607 /* an empty barrier - all done */ 608 bio_endio(bio); 609 } else { 610 bio->bi_opf &= ~REQ_PREFLUSH; 611 612 /* 613 * make_requst() will never return error here, it only 614 * returns error in raid5_make_request() by dm-raid. 615 * Since dm always splits data and flush operation into 616 * two separate io, io size of flush submitted by dm 617 * always is 0, make_request() will not be called here. 618 */ 619 if (WARN_ON_ONCE(!mddev->pers->make_request(mddev, bio))) > 620 bio_io_error(bio);; 621 } 622 623 /* The pair is percpu_ref_get() from md_flush_request() */ 624 percpu_ref_put(&mddev->active_io); 625 } 626 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki