• J
    io_uring: prevent potential eventfd recursion on poll · f0b493e6
    Jens Axboe 提交于
    If we have nested or circular eventfd wakeups, then we can deadlock if
    we run them inline from our poll waitqueue wakeup handler. It's also
    possible to have very long chains of notifications, to the extent where
    we could risk blowing the stack.
    
    Check the eventfd recursion count before calling eventfd_signal(). If
    it's non-zero, then punt the signaling to async context. This is always
    safe, as it takes us out-of-line in terms of stack and locking context.
    
    Cc: stable@vger.kernel.org # 5.1+
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    f0b493e6
io_uring.c 165.5 KB