From: Pavel Begunkov Date: Mon, 23 Mar 2026 12:44:02 +0000 (+0000) Subject: io_uring/zcrx: warn on a repeated area append X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f0b92207a00c731cfbfdefdcf9f9350a11e30ab3;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://patch.msgid.link/28eb67fb8c48445584d7c247a36e1ad8800f0c8b.1774261953.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c index 77be6fb32df6e..e637052b645a3 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;