OSDN Git Service

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)
commitec8516f3b7c40ba7050e6b3a32467e9de451ecdf
tree56449e66dfd500737ad1da9b378f1310471f8256
parentd785a773bed966a75ca1f11d108ae1897189975b
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: c7fb19428d67 ("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