]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
io_uring: clean cqe filling functions
authorPavel Begunkov <asml.silence@gmail.com>
Mon, 19 Sep 2022 17:58:00 +0000 (19:58 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 20 Sep 2022 09:08:27 +0000 (11:08 +0200)
commit142f794ecefdeb80843df7a2b0a496f9cc877c3a
tree41800bfa3eefdfa7a3a15626a316e86a70ee9f46
parente1cd96d11e29213dc3adc430d9578755d2c81fba
io_uring: clean cqe filling functions

[ upstream commmit 913a571affedd17239c4d4ea90c8874b32fc2191 ]

Split io_cqring_fill_event() into a couple of more targeted functions.
The first on is io_fill_cqe_aux() for completions that are not
associated with request completions and doing the ->cq_extra accounting.
Examples are additional CQEs from multishot poll and rsrc notifications.

The second is io_fill_cqe_req(), should be called when it's a normal
request completion. Nothing more to it at the moment, will be used in
later patches.

The last one is inlined __io_fill_cqe() for a finer grained control,
should be used with caution and in hottest places.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/59a9117a4a44fc9efcf04b3afa51e0d080f5943c.1636559119.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
[pavel: backport]
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b850d6ddc78878996039d79833f3d7fd755f0916 linux-5.15.y)
CVE-2022-3176
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/io_uring.c