]> git.ipfire.org Git - people/ms/linux.git/commitdiff
Merge branch 'io_uring/io_uring-5.19' of https://github.com/isilence/linux into io_ur...
authorJens Axboe <axboe@kernel.dk>
Mon, 13 Jun 2022 12:52:52 +0000 (06:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Jun 2022 12:52:52 +0000 (06:52 -0600)
Pull io_uring fixes from Pavel.

* 'io_uring/io_uring-5.19' of https://github.com/isilence/linux:
  io_uring: fix double unlock for pbuf select
  io_uring: kbuf: fix bug of not consuming ring buffer in partial io case
  io_uring: openclose: fix bug of closing wrong fixed file
  io_uring: fix not locked access to fixed buf table
  io_uring: fix races with buffer table unregister
  io_uring: fix races with file table unregister

1  2 
fs/io_uring.c

diff --cc fs/io_uring.c
index 85b116ddfd2a989f50079e7de91bc50637424907,4719eaee3b4538bcd71122f2a0424ad1e9d28596..ca6170a66e62f6f474862aa44c96530e42917f16
@@@ -3876,12 -3847,10 +3888,10 @@@ static void __user *io_ring_buffer_sele
  {
        struct io_uring_buf_ring *br = bl->buf_ring;
        struct io_uring_buf *buf;
 -      __u32 head = bl->head;
 +      __u16 head = bl->head;
  
-       if (unlikely(smp_load_acquire(&br->tail) == head)) {
-               io_ring_submit_unlock(req->ctx, issue_flags);
+       if (unlikely(smp_load_acquire(&br->tail) == head))
                return NULL;
-       }
  
        head &= bl->mask;
        if (head < IO_BUFFER_LIST_BUF_PER_PAGE) {