lkml.org 
[lkml]   [2021]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: 5.13-rt1 + KVM = WARNING: at fs/eventfd.c:74 eventfd_signal()
    From
    Date
    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

    \
     
     \ /
      Last update: 2021-07-14 12:45    [W:5.228 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site