]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring: correct pinned_vm accounting
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 4 Oct 2022 02:19:08 +0000 (03:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:56:40 +0000 (09:56 +0200)
commit796da2e0eff10b7ae7d8d6bd397d5399dd28e57b
treefdab1d40939ee8d7cf88a95e93c43949052cf605
parentb4293c01ee0d0ecdd3cb5801e13f62271144667a
io_uring: correct pinned_vm accounting

commit 42b6419d0aba47c5d8644cdc0b68502254671de5 upstream.

->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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/io_uring.c