]> 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)
commitbc4924f796e2ecebb00c757e044279a49f445df2
tree56449e66dfd500737ad1da9b378f1310471f8256
parenta5c1d5cbd8a417a3eb91553712ba262b2527e864
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: 0bf3e064f36c ("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