]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
io_uring: correct pinned_vm accounting
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 16 Oct 2022 21:42:55 +0000 (22:42 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 24 Nov 2022 13:25:07 +0000 (14:25 +0100)
commit77bee90280fa33d8554db1dd8666d1a9ff6d28d5
tree5db46e01b8830e82afa089567458376f711ddc59
parenteef6c3d768ba58ef5df51df9f6521d1ac51742b0
io_uring: correct pinned_vm accounting

BugLink: https://bugs.launchpad.net/bugs/1996825
[ upstream commit 42b6419d0aba47c5d8644cdc0b68502254671de5 ]

->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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/io_uring.c