diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-22 11:45:48 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-07-22 11:45:48 -0700 |
commit | 9deed1d5f82cf30308027f9f604a95ac7ffdbe19 (patch) | |
tree | 373ce3f6d5ca8ea40d0fa3610f8ac167d96592bd | |
parent | 7d080fa867092c1db078dd72d70cb256642f7b18 (diff) | |
parent | bcc87d978b834c298bbdd9c52454c5d0a946e97e (diff) |
Merge tag 'io_uring-6.11-20240722' of git://git.kernel.dk/linux
Pull io_uring fixes from Jens Axboe:
"Two minor fixes in here, both heading to stable. In detail:
- Fix error where forced async uring_cmd getsockopt returns the wrong
value on execution, leading to it never being completed (Pavel)
- Fix io_alloc_pbuf_ring() using a NULL check rather than IS_ERR
(Pavel)"
* tag 'io_uring-6.11-20240722' of git://git.kernel.dk/linux:
io_uring: fix error pbuf checking
io_uring: fix lost getsockopt completions
-rw-r--r-- | io_uring/kbuf.c | 4 | ||||
-rw-r--r-- | io_uring/uring_cmd.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c index d2945c9c812b..c95dc1736dd9 100644 --- a/io_uring/kbuf.c +++ b/io_uring/kbuf.c @@ -657,8 +657,10 @@ static int io_alloc_pbuf_ring(struct io_ring_ctx *ctx, ring_size = reg->ring_entries * sizeof(struct io_uring_buf_ring); bl->buf_ring = io_pages_map(&bl->buf_pages, &bl->buf_nr_pages, ring_size); - if (!bl->buf_ring) + if (IS_ERR(bl->buf_ring)) { + bl->buf_ring = NULL; return -ENOMEM; + } bl->is_buf_ring = 1; bl->is_mmap = 1; diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index 21ac5fb2d5f0..a54163a83968 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -265,7 +265,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags) req_set_fail(req); io_req_uring_cleanup(req, issue_flags); io_req_set_res(req, ret, 0); - return ret; + return ret < 0 ? ret : IOU_OK; } int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw, |