mshv: clear eventfd counter on irqfd shutdown
authorCarlos López <clopez@suse.de>
Thu, 22 Jan 2026 11:41:31 +0000 (12:41 +0100)
committerWei Liu <wei.liu@kernel.org>
Wed, 4 Feb 2026 06:36:19 +0000 (06:36 +0000)
commit2b4246153e2184e3a3b4edc8cc35337d7a2455a6
treea482f1b0767d7b3d88c59777726e3704d72d2438
parent5ed8cbcaccc0e0ed90e03dac153d01d5b13f6724
mshv: clear eventfd counter on irqfd shutdown

While unhooking from the irqfd waitqueue, clear the internal eventfd
counter by using eventfd_ctx_remove_wait_queue() instead of
remove_wait_queue(), preventing potential spurious interrupts. This
removes the need to store a pointer into the workqueue, as the eventfd
already keeps track of it.

This mimicks what other similar subsystems do on their equivalent paths
with their irqfds (KVM, Xen, ACRN support, etc).

Signed-off-by: Carlos López <clopez@suse.de>
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/mshv_eventfd.c
drivers/hv/mshv_eventfd.h