Re: [PATCH v2 2/2] io_uring: add io-wq workqueue sharing

From: Jens Axboe
Date: Mon Jan 27 2020 - 19:22:07 EST


On 1/27/20 5:15 PM, Pavel Begunkov wrote:
> @@ -6577,7 +6613,11 @@ static long io_uring_setup(u32 entries, struct io_uring_params __user *params)
>
> if (p.flags & ~(IORING_SETUP_IOPOLL | IORING_SETUP_SQPOLL |
> IORING_SETUP_SQ_AFF | IORING_SETUP_CQSIZE |
> - IORING_SETUP_CLAMP))
> + IORING_SETUP_CLAMP | IORING_SETUP_ATTACH_WQ))
> + return -EINVAL;
> +
> + /* wq_fd isn't valid without ATTACH_WQ being set */
> + if (!(p.flags & IORING_SETUP_ATTACH_WQ) && p.wq_fd)
> return -EINVAL;

Since we're now using file descriptors, this no longer works. Any values
(outside of -1) is fair game.

--
Jens Axboe