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>
master
Pavel Begunkov 2026-03-23 12:44:02 +00:00 committed by Jens Axboe
parent 61cfadaae6
commit f0b92207a0
1 changed files with 1 additions and 1 deletions

View File

@ -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;