From: Eric Dumazet Date: Thu, 18 Oct 2012 09:14:12 +0000 (+0000) Subject: tcp: fix FIONREAD/SIOCINQ X-Git-Tag: v3.7-rc3~7^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3374c42aa5f7237e87ff3b0622018636b0c847e;p=pandora-kernel.git tcp: fix FIONREAD/SIOCINQ tcp_ioctl() tries to take into account if tcp socket received a FIN to report correct number bytes in receive queue. But its flaky because if the application ate the last skb, we return 1 instead of 0. Correct way to detect that FIN was received is to test SOCK_DONE. Reported-by: Elliot Hughes Signed-off-by: Eric Dumazet Cc: Neal Cardwell Cc: Tom Herbert Signed-off-by: David S. Miller --- Reading git-diff-tree failed