All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
Cc: devel@openvz.org
Subject: [Devel] [PATCH hci-8.1 0/2] blk-throttle: fix a host panic setting the first throttle limit on a disk under I/O
Date: Mon,  2 Nov 2026 17:12:15 +0100	[thread overview]
Message-ID: <20261102161219.3735623-1-den@openvz.org> (raw)

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

             reply	other threads:[~2026-11-02 16:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 16:12 Denis V. Lunev [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102161219.3735623-1-den@openvz.org \
    --to=den@openvz.org \
    --cc=devel@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.