]> git.baikalelectronics.ru Git - kernel.git/commit
[TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg().
authorDavid S. Miller <davem@sunset.davemloft.net>
Fri, 3 Aug 2007 02:23:56 +0000 (19:23 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 3 Aug 2007 02:42:28 +0000 (19:42 -0700)
commit486f187c24726a271cb9c8fe0b705bbf66b45b95
treef3e3cd29dd541a457e61152560fe4416642a69bc
parente679fa195bc6065edf49ba734865794fd3a50ae3
[TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg().

As discovered by Evegniy Polyakov, if we try to sendmsg after
a connection reset, we can do incredibly stupid things.

The core issue is that inet_sendmsg() tries to autobind the
socket, but we should never do that for TCP.  Instead we should
just go straight into TCP's sendmsg() code which will do all
of the necessary state and pending socket error checks.

TCP's sendpage already directly vectors to tcp_sendpage(), so this
merely brings sendmsg() in line with that.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/af_inet.c
net/ipv4/tcp.c
net/ipv4/tcp_ipv4.c
net/ipv6/af_inet6.c
net/ipv6/tcp_ipv6.c