]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix free of unallocated buffer list
authorDylan Yudaken <dylany@fb.com>
Thu, 21 Jul 2022 11:01:15 +0000 (04:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 21 Jul 2022 14:29:01 +0000 (08:29 -0600)
commit75841dbf5be5bac8ca9d7598d584d24ce0fceb40
tree56449e66dfd500737ad1da9b378f1310471f8256
parentcbd93d1b18ebbe1bce18a17adfc47ccb6f2e5616
io_uring: fix free of unallocated buffer list

in the error path of io_register_pbuf_ring, only free bl if it was
allocated.

Reported-by: Dipanjan Das <mail.dipanjan.das@gmail.com>
Fixes: e790404d1245 ("io_uring: add support for ring mapped supplied buffers")
Signed-off-by: Dylan Yudaken <dylany@fb.com>
Reviewed-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/all/CANX2M5bXKw1NaHdHNVqssUUaBCs8aBpmzRNVEYEvV0n44P7ioA@mail.gmail.com/
Link: https://lore.kernel.org/all/CANX2M5YiZBXU3L6iwnaLs-HHJXRvrxM8mhPDiMDF9Y9sAvOHUA@mail.gmail.com/
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c