Skip to content

Commit 9deed1d

Browse files
committed
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
2 parents 7d080fa + bcc87d9 commit 9deed1d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

io_uring/kbuf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,10 @@ static int io_alloc_pbuf_ring(struct io_ring_ctx *ctx,
657657
ring_size = reg->ring_entries * sizeof(struct io_uring_buf_ring);
658658

659659
bl->buf_ring = io_pages_map(&bl->buf_pages, &bl->buf_nr_pages, ring_size);
660-
if (!bl->buf_ring)
660+
if (IS_ERR(bl->buf_ring)) {
661+
bl->buf_ring = NULL;
661662
return -ENOMEM;
663+
}
662664

663665
bl->is_buf_ring = 1;
664666
bl->is_mmap = 1;

io_uring/uring_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ int io_uring_cmd(struct io_kiocb *req, unsigned int issue_flags)
265265
req_set_fail(req);
266266
io_req_uring_cleanup(req, issue_flags);
267267
io_req_set_res(req, ret, 0);
268-
return ret;
268+
return ret < 0 ? ret : IOU_OK;
269269
}
270270

271271
int io_uring_cmd_import_fixed(u64 ubuf, unsigned long len, int rw,

0 commit comments

Comments
 (0)