io_uring: correct pinned_vm accounting
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 4 Oct 2022 02:19:08 +0000 (03:19 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 7 Oct 2022 18:25:31 +0000 (12:25 -0600)
commitee48e00a5ee8d851b336385afda898fc7d29bf21
treeeca575f637dc14930f3a2ab0b182c7f5d3ac41a0
parentde1c1471bde8f14adf56333e734b2999eb8f5039
io_uring: correct pinned_vm accounting

->mm_account should be released only after we free all registered
buffers, otherwise __io_sqe_buffers_unregister() will see a NULL
->mm_account and skip locked_vm accounting.

Cc: <Stable@vger.kernel.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6d798f65ed4ab8db3664c4d3397d4af16ca98846.1664849932.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c