• Pavel Begunkov's avatar
    io_uring: synchronise ev_posted() with waitqueues · b1445e59
    Pavel Begunkov authored
    waitqueue_active() needs smp_mb() to be in sync with waitqueues
    modification, but we miss it in io_cqring_ev_posted*() apart from
    cq_wait() case.
    
    Take an smb_mb() out of wq_has_sleeper() making it waitqueue_active(),
    and place it a few lines before, so it can synchronise other
    waitqueue_active() as well.
    
    The patch doesn't add any additional overhead, so even if there are
    no problems currently, it's just safer to have it this way.
    Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    b1445e59
io_uring.c 242 KB