]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix refcounting with batched allocations at OOM
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 25 Jan 2020 19:34:01 +0000 (22:34 +0300)
committerJens Axboe <axboe@kernel.dk>
Mon, 27 Jan 2020 22:36:30 +0000 (15:36 -0700)
commit0ca79fe1c122ad8857d6b434826a068f11365210
tree514b35bd07f6e4dbaea3117cbdd859499594ec53
parent17a2629614a3f25ed6c9c510585caab4c0b447e2
io_uring: fix refcounting with batched allocations at OOM

In case of out of memory the second argument of percpu_ref_put_many() in
io_submit_sqes() may evaluate into "nr - (-EAGAIN)", that is clearly
wrong.

Fixes: 757da27dd629 ("io_uring: batch getting pcpu references")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c