Skip to content

Commit f0b9220

Browse files
isilenceaxboe
authored andcommitted
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>
1 parent 61cfada commit f0b9220

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/zcrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static void io_zcrx_free_area(struct io_zcrx_ifq *ifq,
423423
static int io_zcrx_append_area(struct io_zcrx_ifq *ifq,
424424
struct io_zcrx_area *area)
425425
{
426-
if (ifq->area)
426+
if (WARN_ON_ONCE(ifq->area))
427427
return -EINVAL;
428428
ifq->area = area;
429429
return 0;

0 commit comments

Comments
 (0)