OpenVZ / Virtuozzo kernel development (devel@openvz.org)
 help / color / mirror / Atom feed
* [Devel] [PATCH hci-8.1 0/2] blk-throttle: fix a host panic setting the first throttle limit on a disk under I/O
@ 2026-11-02 16:12 Denis V. Lunev
  2026-11-02 16:12 ` [Devel] [PATCH hci-8.1 1/2] ms/blk-throttle: fix access race during throttle policy activation Denis V. Lunev
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Denis V. Lunev @ 2026-11-02 16:12 UTC (permalink / raw)
  Cc: devel

A compute node panicked in submit_bio_noacct() under a vhost-blk worker
(ASUP-3910):

  BUG: kernel NULL pointer dereference, address: 000000000000019e
  RIP: 0010:submit_bio_noacct+0x12e/0x530
   vhost_blk_req_submit+0xf7/0x1c0 [vhost_blk]
   vhost_blk_req_handle+0x3b4/0x400 [vhost_blk]
   vhost_blk_handle_guest_kick+0x1a0/0x2c6 [vhost_blk]

blk_throtl_init() publishes q->td before blkcg_activate_policy()
attaches throttle data to the blkgs. The throttle check in
submit_bio_noacct() runs before bio_queue_enter(), so the queue freeze
does not cover it, and a bio in that window gets a NULL throtl_grp. In
the vmcore the bio is the first read of a dm-qcow2 device created a
moment earlier, and its blkg holds the per-disk limit being applied.
vhost-blk submits as soon as the guest kicks, which makes the window
easy to hit on VM start.

Patch 1 is the upstream fix. Patch 2 is its upstream follow-up and
must go with it: with patch 1 alone blkg_destroy_all() clears the
policy bit before blk_throtl_exit() runs, and q->td leaks on every
removal of a throttled disk. Both apply cleanly.

Build-tested only: the race needs a throttle limit set at the moment
the first bio of a fresh disk is submitted.

https://virtuozzo.atlassian.net/browse/VSTOR-152993

Han Guangjiang (1):
  ms/blk-throttle: fix access race during throttle policy activation

Yu Kuai (1):
  ms/blk-throttle: fix throtl_data leak during disk release

 block/blk-cgroup.c   |  6 ------
 block/blk-cgroup.h   |  6 ++++++
 block/blk-throttle.c | 13 ++++++-------
 block/blk-throttle.h | 18 +++++++++++-------
 4 files changed, 23 insertions(+), 20 deletions(-)

-- 
2.53.0

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-02 17:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 16:12 [Devel] [PATCH hci-8.1 0/2] blk-throttle: fix a host panic setting the first throttle limit on a disk under I/O Denis V. Lunev
2026-11-02 16:12 ` [Devel] [PATCH hci-8.1 1/2] ms/blk-throttle: fix access race during throttle policy activation Denis V. Lunev
2026-11-02 16:59   ` no-reply
2026-11-02 17:34     ` Konstantin Khorenko
2026-11-02 16:12 ` [Devel] [PATCH hci-8.1 2/2] ms/blk-throttle: fix throtl_data leak during disk release Denis V. Lunev
2026-11-02 16:58   ` no-reply
2026-11-02 17:24 ` [Devel] [PATCH hci-8.1 0/2] blk-throttle: fix a host panic setting the first throttle limit on a disk under I/O Konstantin Khorenko

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