Messages in this thread |  | | Subject | Re: 5.13-rt1 + KVM = WARNING: at fs/eventfd.c:74 eventfd_signal() | From | Paolo Bonzini <> | Date | Wed, 14 Jul 2021 12:44:35 +0200 |
| |
On 14/07/21 12:41, Michael S. Tsirkin wrote: >> --------------- 8< --------------- >> From: Paolo Bonzini <pbonzini@redhat.com> >> Subject: [PATCH] eventfd: protect eventfd_wake_count with a local_lock >> >> eventfd_signal assumes that spin_lock_irqsave/spin_unlock_irqrestore is >> non-preemptable and therefore increments and decrements the percpu >> variable inside the critical section. >> >> This obviously does not fly with PREEMPT_RT. If eventfd_signal is >> preempted and an unrelated thread calls eventfd_signal, the result is >> a spurious WARN. To avoid this, protect the percpu variable with a >> local_lock. >> >> Reported-by: Daniel Bristot de Oliveira <bristot@redhat.com> >> Fixes: b5e683d5cab8 ("eventfd: track eventfd_signal() recursion depth") >> Cc: stable@vger.kernel.org >> Cc: He Zhe <zhe.he@windriver.com> >> Cc: Jens Axboe <axboe@kernel.dk> >> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > > > Makes sense ... > > Acked-by: Michael S. Tsirkin <mst@redhat.com> > > want to send this to the windriver guys so they can test? > Here's the list from that thread:
I included He Zhe, but it should be enough for Daniel to test it. The bug is quite obvious once you wear your PREEMPT_RT goggles.
Paolo
|  |