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  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]
Date:	Thu, 15 Jul 2010 15:14:48 +0200
From:	Eric Dumazet <>
To:	David Miller <>,
	Ilpo Järvinen <>,
	Krishna Kumar <>
Cc:	netdev <>
Subject: [RFC] Question about tcp_sendmsg()

While investigating for various bug reports in tcp stack, I looked at
commit def87cf42069a (tcp: Slightly optimize tcp_sendmsg)

One question I have is that the 

sg = sk->sk_route_caps & NETIF_F_SG;

is now done at the beginning of tcp_sendmsg(), and kept in sg variable
for the whole tcp_sendmsg() duration, even if task has to wait for

Previously sk->sk_route_caps & NETIF_F_SG was done in select_size()

I am wondering if this can have a side effect, if SG capability changes
while a thread has to wait in sk_stream_wait_memory(), and socket route
changes (sk_route_caps flips NETIF_F_SG bit)


diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 9fce8a8..8a4d9bd 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1093,6 +1093,7 @@ wait_for_memory:
 				goto do_error;
 			mss_now = tcp_send_mss(sk, &size_goal, flags);
+			sg = sk->sk_route_caps & NETIF_F_SG;

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to
More majordomo info at

Powered by blists - more mailing lists