]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: account locked memory before potential error case
authorJens Axboe <axboe@kernel.dk>
Wed, 5 Aug 2020 19:00:44 +0000 (13:00 -0600)
committerJens Axboe <axboe@kernel.dk>
Thu, 6 Aug 2020 13:39:29 +0000 (07:39 -0600)
commite382a8ead5883aa0d370ef1851aaa58195766d32
tree846cf9599ec0879766b0c5578f4344ca7b8568c3
parent75951787879e76bad1ad1c431def98854893a1a2
io_uring: account locked memory before potential error case

The tear down path will always unaccount the memory, so ensure that we
have accounted it before hitting any of them.

Reported-by: Tomáš Chaloupka <chalucha@gmail.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c