[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <BE1P281MB18589C91B10886A86B26EB6BA3B49@BE1P281MB1858.DEUP281.PROD.OUTLOOK.COM>
Date: Wed, 8 Mar 2023 15:18:55 +0000
From: Adnan Dizdarevic <adnan.dizdarevic@...-intec.de>
To: "willemdebruijn.kernel@...il.com" <willemdebruijn.kernel@...il.com>
CC: "axboe@...nel.dk" <axboe@...nel.dk>,
"asml.silence@...il.com" <asml.silence@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] net/packet: Allow MSG_NOSIGNAL flag in packet_recvmsg
By adding MSG_NOSIGNAL flag to allowed flags in packet_recvmsg, this
patch fixes io_uring recvmsg operations returning -EINVAL when used with
packet socket file descriptors.
In io_uring, MSG_NOSIGNAL flag is added in:
io_uring/net.c/io_recvmsg_prep
Signed-off-by: Adnan Dizdarevic <adnan.dizdarevic@...-intec.de>
---
net/packet/af_packet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index d4e76e2ae153..5ce62194af9e 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -3410,7 +3410,8 @@ static int packet_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
unsigned int origlen = 0;
err = -EINVAL;
- if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT|MSG_ERRQUEUE))
+ if (flags & ~(MSG_PEEK | MSG_DONTWAIT | MSG_TRUNC | MSG_CMSG_COMPAT |
+ MSG_ERRQUEUE | MSG_NOSIGNAL))
goto out;
#if 0
--
2.37.2
Powered by blists - more mailing lists