]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mshv: clear eventfd counter on irqfd shutdown
authorCarlos López <clopez@suse.de>
Thu, 22 Jan 2026 11:41:31 +0000 (12:41 +0100)
committerSasha Levin <sashal@kernel.org>
Wed, 4 Mar 2026 12:20:46 +0000 (07:20 -0500)
commit65e07e4a3e9aebc38b17e615fc9b03101ca6a475
treebbe4abb679f6a4cb5ef2ac35aa00efbd3e38f169
parent70aa07eee32dbd5641a8b86bad69e587684ad08e
mshv: clear eventfd counter on irqfd shutdown

[ Upstream commit 2b4246153e2184e3a3b4edc8cc35337d7a2455a6 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hv/mshv_eventfd.c
drivers/hv/mshv_eventfd.h