]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/net: don't skip notifs for failed requests
authorPavel Begunkov <asml.silence@gmail.com>
Sun, 16 Oct 2022 20:33:29 +0000 (21:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Oct 2022 10:39:27 +0000 (12:39 +0200)
commit9dc0dcb6dc98be4bfe17103ca319fd9b5b83046e
treeacfa8c76c5ac452fc3b1552e42e05d030629160d
parent35cddca07bce120f7e24041095885cbf0014bdf8
io_uring/net: don't skip notifs for failed requests

[ upstream commit 6ae91ac9a6aa7d6005c3c6d0f4d263fbab9f377f ]

We currently only add a notification CQE when the send succeded, i.e.
cqe.res >= 0. However, it'd be more robust to do buffer notifications
for failed requests as well in case drivers decide do something fanky.

Always return a buffer notification after initial prep, don't hide it.
This behaviour is better aligned with documentation and the patch also
helps the userspace to respect it.

Cc: stable@vger.kernel.org # 6.0
Suggested-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9c8bead87b2b980fcec441b8faef52188b4a6588.1664292100.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/net.c