net: Fix oops from tcp_collapse() when using splice()
commitde0737be8e8f3bc0af093d73d816347b99cf9df6
authorSteven J. Magnani <steve@digidescorp.com>
Tue, 30 Mar 2010 20:56:01 +0000 (30 13:56 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 12 May 2010 22:02:59 +0000 (12 15:02 -0700)
tree0789de224746a6eac7a56a72dc34af06e1f0ea94
parent8cee6e2f8cd203fd5dfaf10a54b64084eb572e02
net: Fix oops from tcp_collapse() when using splice()

[ Upstream commit baff42ab1494528907bf4d5870359e31711746ae ]

tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
This can cause a panic in tcp_collapse() if it is called as a result
of the recv_actor dropping the socket lock.

A userspace program that splices data from a socket to either another
socket or to a file can trigger this bug.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/ipv4/tcp.c