]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
um: irqs: process outstanding IRQs when unblocking signals
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 18 Oct 2023 12:36:40 +0000 (14:36 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 3 Jul 2024 10:18:01 +0000 (12:18 +0200)
commitc140a5bd5da48de353be8bf9356f71a66f622a68
treebfb840aa8a6a7ff9aeb5615d8ab0d8b4a562c49d
parent22a40d14b572deb80c0648557f4bd502d7e83826
um: irqs: process outstanding IRQs when unblocking signals

When in time-travel mode, the eventfd events are read even when signals
are blocked as SIGIO still needs to be processed. In this case, the
event is cleared on the eventfd but the IRQ still needs to be fired
later.

We did already ensure that the SIGIO handler is run again. However, the
FDs are configured to be level triggered, so that eventfd will not
notify again. As such, add some logic to mark the IRQ as pending and
process it at the next opportunity.

To avoid duplication, reuse the logic used for the suspend/resume case.
This does not really change anything except for delaying running the
IRQs with timetravel_handler at a slightly later point in time (and
possibly running non-timetravel IRQs that shouldn't happen earlier).
While at it, move marking as pending into irq_event_handler as that is
the more logical place for it to happen.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20231018123643.1255813-1-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/kernel/irq.c