* [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg
[not found] <CANn89iJE6SpB2bfXEc=73km6B2xtBSWHj==WsYFnH089WPKtSA@mail.gmail.com>
@ 2023-02-24 15:01 ` David Lamparter
2023-02-24 15:42 ` David Lamparter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: David Lamparter @ 2023-02-24 15:01 UTC (permalink / raw)
To: io-uring; +Cc: netdev, David Lamparter, Eric Dumazet, Jens Axboe
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().
Signed-off-by: David Lamparter <[email protected]>
Cc: Eric Dumazet <[email protected]>
Cc: Jens Axboe <[email protected]>
---
> Sure, or perhaps David wanted to take care of this.
Here you go. But maybe give me a few hours to test/confirm...
diff --git a/io_uring/net.c b/io_uring/net.c
index cbd4b725f58c..b7f190ca528e 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -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)
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg
2023-02-24 15:01 ` [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg David Lamparter
@ 2023-02-24 15:42 ` David Lamparter
2023-02-24 16:14 ` Eric Dumazet
2023-02-24 16:57 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: David Lamparter @ 2023-02-24 15:42 UTC (permalink / raw)
To: David Lamparter; +Cc: io-uring, netdev, Eric Dumazet, Jens Axboe
On Fri, Feb 24, 2023 at 04:01:24PM +0100, David Lamparter wrote:
> 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.
> ---
> > Sure, or perhaps David wanted to take care of this.
>
> Here you go. But maybe give me a few hours to test/confirm...
Unsurprisingly, it works as expected.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg
2023-02-24 15:01 ` [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg David Lamparter
2023-02-24 15:42 ` David Lamparter
@ 2023-02-24 16:14 ` Eric Dumazet
2023-02-24 16:57 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2023-02-24 16:14 UTC (permalink / raw)
To: David Lamparter; +Cc: io-uring, netdev, Jens Axboe
On Fri, Feb 24, 2023 at 4:04 PM David Lamparter <[email protected]> wrote:
>
> 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().
>
> Signed-off-by: David Lamparter <[email protected]>
> Cc: Eric Dumazet <[email protected]>
> Cc: Jens Axboe <[email protected]>
> ---
>
> > Sure, or perhaps David wanted to take care of this.
>
> Here you go. But maybe give me a few hours to test/confirm...
>
Reviewed-by: Eric Dumazet <[email protected]>
Thanks !
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg
2023-02-24 15:01 ` [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg David Lamparter
2023-02-24 15:42 ` David Lamparter
2023-02-24 16:14 ` Eric Dumazet
@ 2023-02-24 16:57 ` Jens Axboe
2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2023-02-24 16:57 UTC (permalink / raw)
To: io-uring, David Lamparter; +Cc: netdev, Eric Dumazet
On Fri, 24 Feb 2023 16:01:24 +0100, David Lamparter wrote:
> 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().
>
> [...]
Applied, thanks!
[1/1] io_uring: remove MSG_NOSIGNAL from recvmsg
commit: 4492575406d8592b623987cb36b8234d285cfa17
Best regards,
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-02-24 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CANn89iJE6SpB2bfXEc=73km6B2xtBSWHj==WsYFnH089WPKtSA@mail.gmail.com>
2023-02-24 15:01 ` [PATCH] io_uring: remove MSG_NOSIGNAL from recvmsg David Lamparter
2023-02-24 15:42 ` David Lamparter
2023-02-24 16:14 ` Eric Dumazet
2023-02-24 16:57 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox