summaryrefslogtreecommitdiffstats
path: root/io_uring/napi.c
diff options
context:
space:
mode:
Diffstat (limited to 'io_uring/napi.c')
-rw-r--r--io_uring/napi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/napi.c b/io_uring/napi.c
index 762254a7ff3f..327e5f3a8abe 100644
--- 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)