From 0a13b31c0699eea1d21de33167a353eec1d65ab7 Mon Sep 17 00:00:00 2001 From: Ksawlii Date: Sun, 24 Nov 2024 00:22:53 +0100 Subject: [PATCH] Revert "io_uring/sqpoll: do not allow pinning outside of cpuset" This reverts commit 33068eaaffa19efdb4fdae51d8cb28b56818956c. --- io_uring/io_uring.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 0e4edde92..3d9f6a4f1 100755 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -56,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -8775,12 +8774,10 @@ static int io_sq_offload_create(struct io_ring_ctx *ctx, return 0; if (p->flags & IORING_SETUP_SQ_AFF) { - struct cpumask allowed_mask; int cpu = p->sq_thread_cpu; ret = -EINVAL; - cpuset_cpus_allowed(current, &allowed_mask); - if (!cpumask_test_cpu(cpu, &allowed_mask)) + if (cpu >= nr_cpu_ids || !cpu_online(cpu)) goto err_sqpoll; sqd->sq_cpu = cpu; } else {