io_uring: convert accept4() -ERESTARTSYS into -EINTR
Jens Axboe
maintainerPATCH 1/1 io_uring: convert accept4() -ERESTARTSYS into -EINTR
If we cancel a pending accept operating with a signal, we get -ERESTARTSYS returned. Turn that into -EINTR for userspace, we should not be return -ERESTARTSYS.
Reported-by Hrvoje Zeba <[email protected]>
Signed-off-by Jens Axboe <[email protected]>
---
fs/io_uring.c +2 -0
@@ -1920,6 +1920,8 @@ static int io_accept(struct io_kiocb *req, const struct io_uring_sqe *sqe, req->work.flags |=IO_WQ_WORK_NEEDS_FILES ;return -EAGAIN ; } +if (ret == -ERESTARTSYS ) + ret = -EINTR ;if (ret <0 && (req->flags &REQ_F_LINK )) req->flags |=REQ_F_FAIL_LINK ;io_cqring_add_event (req, ret);
Signature · 1 line
Jens Axboe