Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

- Fix a regression with the poll retry, introduced in this merge window
(me)

- Fix a regression with the alloc cache not decrementing the member
count on removal. Also a regression from this merge window (Pavel)

- Fix race around rsrc node grabbing (Pavel)

* tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux:
io_uring: fix poll/netmsg alloc caches
io_uring/rsrc: fix rogue rsrc node grabbing
io_uring/poll: clear single/double poll flags on poll arming

+8 -8
+1
io_uring/alloc_cache.h
··· 27 27 struct hlist_node *node = cache->list.first; 28 28 29 29 hlist_del(node); 30 + cache->nr_cached--; 30 31 return container_of(node, struct io_cache_entry, node); 31 32 } 32 33
+1
io_uring/poll.c
··· 726 726 apoll = io_req_alloc_apoll(req, issue_flags); 727 727 if (!apoll) 728 728 return IO_APOLL_ABORTED; 729 + req->flags &= ~(REQ_F_SINGLE_POLL | REQ_F_DOUBLE_POLL); 729 730 req->flags |= REQ_F_POLLED; 730 731 ipt.pt._qproc = io_async_queue_proc; 731 732
+6 -8
io_uring/rsrc.h
··· 144 144 unsigned int issue_flags) 145 145 { 146 146 if (!req->rsrc_node) { 147 + io_ring_submit_lock(ctx, issue_flags); 148 + 149 + lockdep_assert_held(&ctx->uring_lock); 150 + 147 151 req->rsrc_node = ctx->rsrc_node; 148 - 149 - if (!(issue_flags & IO_URING_F_UNLOCKED)) { 150 - lockdep_assert_held(&ctx->uring_lock); 151 - 152 - io_charge_rsrc_node(ctx); 153 - } else { 154 - percpu_ref_get(&req->rsrc_node->refs); 155 - } 152 + io_charge_rsrc_node(ctx); 153 + io_ring_submit_unlock(ctx, issue_flags); 156 154 } 157 155 } 158 156