projects
/
users
/
dwmw2
/
linux.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8b632e
)
io_uring: don't allow netpolling with SETUP_IOPOLL
author
Pavel Begunkov <asml.silence@gmail.com>
Wed, 24 Jul 2024 11:16:17 +0000
(12:16 +0100)
committer
Jens Axboe <axboe@kernel.dk>
Wed, 24 Jul 2024 14:01:49 +0000
(08:01 -0600)
IORING_SETUP_IOPOLL rings don't have any netpoll handling, let's fail
attempts to register netpolling in this case, there might be people who
will mix up IOPOLL and netpoll.
Cc: stable@vger.kernel.org
Fixes: ef1186c1a875b ("io_uring: add register/unregister napi function")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/1e7553aee0a8ae4edec6742cd6dd0c1e6914fba8.1721819383.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/napi.c
patch
|
blob
|
history
diff --git
a/io_uring/napi.c
b/io_uring/napi.c
index 762254a7ff3ffc0c9ee61897f7fac4a06ed5ca4b..327e5f3a8abe01c481440081307a4f7d206b1da3 100644
(file)
--- a/
io_uring/napi.c
+++ b/
io_uring/napi.c
@@
-222,6
+222,8
@@
int io_register_napi(struct io_ring_ctx *ctx, void __user *arg)
};
struct io_uring_napi napi;
+ if (ctx->flags & IORING_SETUP_IOPOLL)
+ return -EINVAL;
if (copy_from_user(&napi, arg, sizeof(napi)))
return -EFAULT;
if (napi.pad[0] || napi.pad[1] || napi.pad[2] || napi.resv)