summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2026-03-23 15:44:02 +0300
committerJens Axboe <axboe@kernel.dk>2026-04-01 19:21:13 +0300
commitf0b92207a00c731cfbfdefdcf9f9350a11e30ab3 (patch)
tree1dc6e012767142d16bd26dc4b35d4a8f4fb5c636
parent61cfadaae6612830b1d4c3457a9935d362af8839 (diff)
downloadlinux-f0b92207a00c731cfbfdefdcf9f9350a11e30ab3.tar.xz
io_uring/zcrx: warn on a repeated area append
We only support a single area, no path should be able to call io_zcrx_append_area() twice. Warn if that happens instead of just returning an error. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://patch.msgid.link/28eb67fb8c48445584d7c247a36e1ad8800f0c8b.1774261953.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/zcrx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index 77be6fb32df6..e637052b645a 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -423,7 +423,7 @@ static void io_zcrx_free_area(struct io_zcrx_ifq *ifq,
static int io_zcrx_append_area(struct io_zcrx_ifq *ifq,
struct io_zcrx_area *area)
{
- if (ifq->area)
+ if (WARN_ON_ONCE(ifq->area))
return -EINVAL;
ifq->area = area;
return 0;