[Devel] [PATCH VZ10] drivers/vhost/blk: fix vhost_blk_req_done() softirq handling

Vasileios Almpanis vasileios.almpanis at virtuozzo.com
Tue Aug 18 11:53:04 MSK 2026


On Mon, 17 Aug 2026 03:02:34 +0300, Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com> wrote:
> vhost_blk_req_done() does bio_release_pages(), which may sleep on
> folio_lock() when we need to dirty pages. So we get this:
> 
> [ 9120.053244] BUG: scheduling while atomic: swapper/1/0/0x00000102
> ...
> [ 9120.079613] Hardware name: Acronis OpenStack Compute/Virtuozzo, BIOS 1.16.1-1.vz9.2 04/01/2014
> [ 9120.079629] Call Trace:
> [ 9120.079632]  <IRQ>
> [ 9120.079638]  dump_stack_lvl+0x4e/0x70
> [ 9120.079646]  __schedule_bug.cold+0x3e/0x4a
> [ 9120.079650]  schedule_debug.isra.0+0x93/0xc0
> [ 9120.079655]  __schedule+0x7a/0x630
> [ 9120.079659]  ? enqueue_task_fair+0x150/0x710
> [ 9120.079664]  schedule+0x27/0x80
> [ 9120.079666]  io_schedule+0x46/0x70
> [ 9120.079669]  folio_wait_bit_common+0x13a/0x340
> [ 9120.079686]  ? __pfx_wake_page_function+0x10/0x10
> [ 9120.079690]  __bio_release_pages+0x25b/0x280
> [ 9120.079698]  vhost_blk_req_done+0x98/0xa0 [vhost_blk]
> [ 9120.079702]  blk_update_request+0x17c/0x420
> [ 9120.079707]  blk_mq_end_request+0x1c/0x30
> [ 9120.079711]  dm_softirq_done+0x158/0x280 [dm_mod]
> [ 9120.079737]  blk_complete_reqs+0x40/0x50
> [ 9120.079740]  handle_softirqs+0xe5/0x2a0
> [ 9120.079744]  __irq_exit_rcu+0xbd/0xe0
> [ 9120.079746]  sysvec_call_function_single+0x71/0x90
> [ 9120.079750]  </IRQ>
> [ 9120.079751]  <TASK>
> [ 9120.079752]  asm_sysvec_call_function_single+0x1a/0x20
> 
> [...]

Reviewed-by: Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>

-- 
Vasileios Almpanis <vasileios.almpanis at virtuozzo.com>


More information about the Devel mailing list