From: sashiko-bot@kernel.org
To: "Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2 1/2] Drivers: hv: vmbus: Replace lockdep_hardirq_threaded() with lockdep annotation
Date: Tue, 21 Jul 2026 15:47:56 +0000 [thread overview]
Message-ID: <20260721154756.A2A961F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260721153216.382536-2-bigeasy@linutronix.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Critical] The clock event timer interrupt (HVMSG_TIMER_EXPIRED) is incorrectly processed in a kthread on PREEMPT_RT, violating the architectural requirement that the system tick must run in hardirq context.
--
--- Patch [1]: [PATCH v2 1/2] Drivers: hv: vmbus: Replace lockdep_hardirq_threaded() with lockdep annotation ---
commit f939a4b9727e456e689d5d7488e6095b1358e5b5
Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Drivers: hv: vmbus: Replace lockdep_hardirq_threaded() with lockdep annotation
This commit replaces the use of lockdep_hardirq_threaded() with a lockdep
annotation. This limits the threaded context on PREEMPT_RT to __vmbus_isr()
and clarifies that the ISR is not a shared handler.
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index 23206640c6139..44877664d9d08 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -1384,8 +1384,19 @@ void vmbus_isr(void)
> if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
> vmbus_irqd_wake();
[Severity: Critical]
This isn't a bug introduced by this patch, but is it safe to defer all
VMbus interrupt processing to the vmbus_irqd kthread on PREEMPT_RT?
When booting a PREEMPT_RT kernel on a Hyper-V host using legacy timer mode,
the kthread handles the hypervisor timer message and invokes the timer ISR:
vmbus_message_sched()
if (msg->header.message_type == HVMSG_TIMER_EXPIRED) {
hv_stimer0_isr();
This executes the clock event handler in thread context, which breaks the
requirement that the system tick must run in hardirq context:
hv_stimer0_isr()
ce = this_cpu_ptr(hv_clock_event);
ce->event_handler(ce);
Because get_irq_regs() returns NULL when called from a kthread, calling
tick_handle_periodic() and then
update_process_times(user_mode(get_irq_regs())) will dereference a NULL
pointer and panic the kernel.
Alternatively, if high-resolution timers are used, tick_nohz_handler() sees
a NULL regs pointer and skips tick_sched_handle(), completely stalling the
scheduler tick and RCU updates, freezing the system.
> } else {
> - lockdep_hardirq_threaded();
> + static DEFINE_WAIT_OVERRIDE_MAP(vmbus_map, LD_WAIT_CONFIG);
> +
> + /*
> + * vmbus_isr is never force-threaded and always invoked at hard
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260721153216.382536-1-bigeasy@linutronix.de?part=1
next prev parent reply other threads:[~2026-07-21 15:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 15:32 [PATCH v2 0/2] Drivers: hv: vmbus: Small cleanups Sebastian Andrzej Siewior
2026-07-21 15:32 ` [PATCH v2 1/2] Drivers: hv: vmbus: Replace lockdep_hardirq_threaded() with lockdep annotation Sebastian Andrzej Siewior
2026-07-21 15:47 ` sashiko-bot [this message]
2026-07-22 20:18 ` Michael Kelley
2026-07-21 15:32 ` [PATCH v2 2/2] Drivers: hv: vmbus: Remove vmbus_irq_initialized Sebastian Andrzej Siewior
2026-07-21 15:49 ` sashiko-bot
2026-07-22 23:22 ` [PATCH v2 0/2] Drivers: hv: vmbus: Small cleanups Wei Liu
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=20260721154756.A2A961F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox