mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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
This commit is contained in:
@@ -27,6 +27,7 @@ static inline struct io_cache_entry *io_alloc_cache_get(struct io_alloc_cache *c
|
|||||||
struct hlist_node *node = cache->list.first;
|
struct hlist_node *node = cache->list.first;
|
||||||
|
|
||||||
hlist_del(node);
|
hlist_del(node);
|
||||||
|
cache->nr_cached--;
|
||||||
return container_of(node, struct io_cache_entry, node);
|
return container_of(node, struct io_cache_entry, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -726,6 +726,7 @@ int io_arm_poll_handler(struct io_kiocb *req, unsigned issue_flags)
|
|||||||
apoll = io_req_alloc_apoll(req, issue_flags);
|
apoll = io_req_alloc_apoll(req, issue_flags);
|
||||||
if (!apoll)
|
if (!apoll)
|
||||||
return IO_APOLL_ABORTED;
|
return IO_APOLL_ABORTED;
|
||||||
|
req->flags &= ~(REQ_F_SINGLE_POLL | REQ_F_DOUBLE_POLL);
|
||||||
req->flags |= REQ_F_POLLED;
|
req->flags |= REQ_F_POLLED;
|
||||||
ipt.pt._qproc = io_async_queue_proc;
|
ipt.pt._qproc = io_async_queue_proc;
|
||||||
|
|
||||||
|
@@ -144,15 +144,13 @@ static inline void io_req_set_rsrc_node(struct io_kiocb *req,
|
|||||||
unsigned int issue_flags)
|
unsigned int issue_flags)
|
||||||
{
|
{
|
||||||
if (!req->rsrc_node) {
|
if (!req->rsrc_node) {
|
||||||
|
io_ring_submit_lock(ctx, issue_flags);
|
||||||
|
|
||||||
|
lockdep_assert_held(&ctx->uring_lock);
|
||||||
|
|
||||||
req->rsrc_node = ctx->rsrc_node;
|
req->rsrc_node = ctx->rsrc_node;
|
||||||
|
io_charge_rsrc_node(ctx);
|
||||||
if (!(issue_flags & IO_URING_F_UNLOCKED)) {
|
io_ring_submit_unlock(ctx, issue_flags);
|
||||||
lockdep_assert_held(&ctx->uring_lock);
|
|
||||||
|
|
||||||
io_charge_rsrc_node(ctx);
|
|
||||||
} else {
|
|
||||||
percpu_ref_get(&req->rsrc_node->refs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user