]> git.itanic.dy.fi Git - linux-stable/commit
xen/evtchn: avoid WARN() when unbinding an event channel
authorJuergen Gross <jgross@suse.com>
Wed, 13 Mar 2024 07:14:08 +0000 (08:14 +0100)
committerJuergen Gross <jgross@suse.com>
Sun, 17 Mar 2024 17:57:11 +0000 (18:57 +0100)
commit51c23bd691c0f1fb95b29731c356c6fd69925d17
tree8303d3b567bd0d502a80ed8b1c72b1c91d584fee
parent38620fc4e8934f1801c7811ef39a041914ac4c1d
xen/evtchn: avoid WARN() when unbinding an event channel

When unbinding a user event channel, the related handler might be
called a last time in case the kernel was built with
CONFIG_DEBUG_SHIRQ. This might cause a WARN() in the handler.

Avoid that by adding an "unbinding" flag to struct user_event which
will short circuit the handler.

Fixes: 9e90e58c11b7 ("xen: evtchn: Allow shared registration of IRQ handers")
Reported-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Tested-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Link: https://lore.kernel.org/r/20240313071409.25913-2-jgross@suse.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/evtchn.c