lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241206052607.1197-5-kuniyu@amazon.com>
Date: Fri, 6 Dec 2024 14:25:56 +0900
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
	<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>
CC: Kuniyuki Iwashima <kuniyu@...zon.com>, Kuniyuki Iwashima
	<kuni1840@...il.com>, <netdev@...r.kernel.org>
Subject: [PATCH v1 net-next 04/15] af_unix: Remove redundant SEND_SHUTDOWN check in unix_stream_sendmsg().

sock_alloc_send_pskb() in the following while loop checks if
SEND_SHUTDOWN is set to sk->sk_shutdown.

Let's remove the redundant check in unix_stream_sendmsg().

Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
---
 net/unix/af_unix.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 8d13b580731c..db00afe84ce9 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2275,9 +2275,6 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
 		}
 	}
 
-	if (READ_ONCE(sk->sk_shutdown) & SEND_SHUTDOWN)
-		goto pipe_err;
-
 	while (sent < len) {
 		size = len - sent;
 
@@ -2361,7 +2358,6 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
 pipe_err_free:
 	unix_state_unlock(other);
 	kfree_skb(skb);
-pipe_err:
 	if (sent == 0 && !(msg->msg_flags&MSG_NOSIGNAL))
 		send_sig(SIGPIPE, current, 0);
 	err = -EPIPE;
-- 
2.39.5 (Apple Git-154)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ