]> Git Repo - linux.git/commitdiff
io_uring: remove MSG_NOSIGNAL from recvmsg
authorDavid Lamparter <[email protected]>
Fri, 24 Feb 2023 15:01:24 +0000 (16:01 +0100)
committerJens Axboe <[email protected]>
Fri, 24 Feb 2023 19:59:02 +0000 (12:59 -0700)
MSG_NOSIGNAL is not applicable for the receiving side, SIGPIPE is
generated when trying to write to a "broken pipe".  AF_PACKET's
packet_recvmsg() does enforce this, giving back EINVAL when MSG_NOSIGNAL
is set - making it unuseable in io_uring's recvmsg.

Remove MSG_NOSIGNAL from io_recvmsg_prep().

Cc: [email protected] # v5.10+
Signed-off-by: David Lamparter <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jens Axboe <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
io_uring/net.c

index cbd4b725f58c98e5bc5bf88d5707db5c8302e071..b7f190ca528e6e259eb2b072d7a16aaba98848cb 100644 (file)
@@ -567,7 +567,7 @@ int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
        sr->flags = READ_ONCE(sqe->ioprio);
        if (sr->flags & ~(RECVMSG_FLAGS))
                return -EINVAL;
-       sr->msg_flags = READ_ONCE(sqe->msg_flags) | MSG_NOSIGNAL;
+       sr->msg_flags = READ_ONCE(sqe->msg_flags);
        if (sr->msg_flags & MSG_DONTWAIT)
                req->flags |= REQ_F_NOWAIT;
        if (sr->msg_flags & MSG_ERRQUEUE)
This page took 0.059469 seconds and 4 git commands to generate.