diff --git a/fs/io_uring.c b/fs/io_uring.c index 9507ef2b399e4b4e83b6e818f18680d8588a418a..68f0ac9470c3db5891b0a11677ca47734e1f124e 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -1862,7 +1862,8 @@ static int io_sq_thread(void *data) /* Tell userspace we may need a wakeup call */ ctx->sq_ring->flags |= IORING_SQ_NEED_WAKEUP; - smp_wmb(); + /* make sure to read SQ tail after writing flags */ + smp_mb(); if (!io_get_sqring(ctx, &sqes[0])) { if (kthread_should_stop()) {