]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/zcrx: fix leaks on failed registration
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 19 Feb 2025 10:09:54 +0000 (10:09 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 19 Feb 2025 21:52:58 +0000 (14:52 -0700)
commit95e65f2d0bdef883b09b7044b1435a36819ae38a
tree80da393567a7876fc74fd3519d3d0955657ca996
parentbc674a04c47cc23ad7e12893cad6226ea8f7a8ec
io_uring/zcrx: fix leaks on failed registration

If we try to register a device-less interface like veth,
io_register_zcrx_ifq() will leak struct io_zcrx_ifq with a bunch of
resources attached to it. Fix that.

Fixes: 035af94b39fd ("io_uring/zcrx: grab a net device")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202502190532.W7NnmyiP-lkp@intel.com/
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/fbf16279dd73fa4c6df048168728355636ba5f53.1739959771.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/zcrx.c