commit f914a9bde89c55749b11100377abf0bc479df109
parent b7f7bd08aec44cfa4174a333bd334c5ae2d8acbd
Author: Alexey Yerin <yyp@disroot.org>
Date: Sun, 9 Jan 2022 13:22:31 +0300
iobus::io_uring: correctly dispatch internal SQEs
Those don't have a valid handle attached and segfault in done() when
trying to free callbacks.
Signed-off-by: Alexey Yerin <yyp@disroot.org>
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/iobus/io_uring/bus.ha b/iobus/io_uring/bus.ha
@@ -64,8 +64,8 @@ export fn dispatch(bus: *bus) (result | error) = {
// XXX: Internal SQEs may have to be more sophisticated in the
// future, we'll see
if (io_uring::get_user(res) == &internal_sqe) {
- io_uring::result(res)!;
- done(bus, res);
+ io_uring::result(res)!; // Assert success
+ io_uring::cqe_seen(&bus.uring, res);
continue;
};
const handle = handleof(res);