aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/usb/cdns3/cdns3-imx.c
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2020-02-06 19:51:16 +0300
committerJens Axboe <axboe@kernel.dk>2020-02-06 13:58:57 -0700
commit1e95081cb5b4cf77065d37866f57cf3c90a3df78 (patch)
tree35f81194060211299102a3e9ce37349a338ae6c0 /drivers/usb/cdns3/cdns3-imx.c
parentio_uring: fix 1-bit bitfields to be unsigned (diff)
downloadwireguard-linux-1e95081cb5b4cf77065d37866f57cf3c90a3df78.tar.xz
wireguard-linux-1e95081cb5b4cf77065d37866f57cf3c90a3df78.zip
io_uring: fix deferred req iovec leak
After defer, a request will be prepared, that includes allocating iovec if needed, and then submitted through io_wq_submit_work() but not custom handler (e.g. io_rw_async()/io_sendrecv_async()). However, it'll leak iovec, as it's in io-wq and the code goes as follows: io_read() { if (!io_wq_current_is_worker()) kfree(iovec); } Put all deallocation logic in io_{read,write,send,recv}(), which will leave the memory, if going async with -EAGAIN. It also fixes a leak after failed io_alloc_async_ctx() in io_{recv,send}_msg(). Cc: stable@vger.kernel.org # 5.5 Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-imx.c')
0 files changed, 0 insertions, 0 deletions