]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring/rsrc: don't put/free empty buffers
authorJens Axboe <axboe@kernel.dk>
Thu, 12 Dec 2024 15:01:52 +0000 (08:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 12 Dec 2024 15:01:52 +0000 (08:01 -0700)
commit99d6af6e8a22b792e1845b186f943cd10bb4b7b0
treec7af221e463e44672298b000de646274e9eba704
parenta07d2d7930c75e6bf88683b376d09ab1f3fed2aa
io_uring/rsrc: don't put/free empty buffers

If cloning of buffers fail and we have to put the ones already grabbed,
check for NULL buffers and skip those. They used to be dummy ubufs, but
now they are just NULL and that should be checked before reaping them.

Reported-by: chase xd <sl1589472800@gmail.com>
Link: https://lore.kernel.org/io-uring/CADZouDQ7TcKn8gz8_efnyAEp1JvU1ktRk8PWz-tO0FXUoh8VGQ@mail.gmail.com/
Fixes: d50f94d761a5 ("io_uring/rsrc: get rid of the empty node and dummy_ubuf")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.c