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-next>] [day] [month] [year] [list]
Message-ID: <8d326eb1-03de-6b8b-009e-7365255dd271@kernel.dk>
Date:   Sat, 26 Mar 2022 09:57:30 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     netdev@...r.kernel.org
Cc:     Eric Dumazet <edumazet@...gle.com>
Subject: [PATCH] net: remove unused TCPF_TSQ_DEFERRED

tcp_release_cb() checks for this flag, but nobody is setting it. Just
kill it off.

Signed-off-by: Jens Axboe <axboe@...nel.dk>

---

diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index 78b91bb92f0d..7d803ab7da45 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -428,7 +428,6 @@ enum tsq_enum {
 enum tsq_flags {
 	TSQF_THROTTLED			= (1UL << TSQ_THROTTLED),
 	TSQF_QUEUED			= (1UL << TSQ_QUEUED),
-	TCPF_TSQ_DEFERRED		= (1UL << TCP_TSQ_DEFERRED),
 	TCPF_WRITE_TIMER_DEFERRED	= (1UL << TCP_WRITE_TIMER_DEFERRED),
 	TCPF_DELACK_TIMER_DEFERRED	= (1UL << TCP_DELACK_TIMER_DEFERRED),
 	TCPF_MTU_REDUCED_DEFERRED	= (1UL << TCP_MTU_REDUCED_DEFERRED),
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5079832af5c1..a53bc45a2053 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1064,8 +1064,7 @@ static void tcp_tasklet_func(struct tasklet_struct *t)
 	}
 }
 
-#define TCP_DEFERRED_ALL (TCPF_TSQ_DEFERRED |		\
-			  TCPF_WRITE_TIMER_DEFERRED |	\
+#define TCP_DEFERRED_ALL (TCPF_WRITE_TIMER_DEFERRED |	\
 			  TCPF_DELACK_TIMER_DEFERRED |	\
 			  TCPF_MTU_REDUCED_DEFERRED)
 /**
@@ -1087,10 +1086,6 @@ void tcp_release_cb(struct sock *sk)
 		nflags = flags & ~TCP_DEFERRED_ALL;
 	} while (cmpxchg(&sk->sk_tsq_flags, flags, nflags) != flags);
 
-	if (flags & TCPF_TSQ_DEFERRED) {
-		tcp_tsq_write(sk);
-		__sock_put(sk);
-	}
 	/* Here begins the tricky part :
 	 * We are called from release_sock() with :
 	 * 1) BH disabled

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ