Skip to content

Commit 7605c43

Browse files
eqvinoxaxboe
authored andcommitted
io_uring: remove MSG_NOSIGNAL from recvmsg
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]>
1 parent 977bc87 commit 7605c43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ int io_recvmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
567567
sr->flags = READ_ONCE(sqe->ioprio);
568568
if (sr->flags & ~(RECVMSG_FLAGS))
569569
return -EINVAL;
570-
sr->msg_flags = READ_ONCE(sqe->msg_flags) | MSG_NOSIGNAL;
570+
sr->msg_flags = READ_ONCE(sqe->msg_flags);
571571
if (sr->msg_flags & MSG_DONTWAIT)
572572
req->flags |= REQ_F_NOWAIT;
573573
if (sr->msg_flags & MSG_ERRQUEUE)

0 commit comments

Comments
 (0)