From: Tom Marshall Date: Mon, 20 Sep 2010 22:42:05 +0000 (-0700) Subject: tcp: Fix race in tcp_poll X-Git-Tag: v2.6.27.57~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f55602fe53731957890c6af874c40f5b0c07a387;p=pandora-kernel.git tcp: Fix race in tcp_poll [ Upstream commit a4d258036ed9b2a1811c3670c6099203a0f284a0 ] If a RST comes in immediately after checking sk->sk_err, tcp_poll will return POLLIN but not POLLOUT. Fix this by checking sk->sk_err at the end of tcp_poll. Additionally, ensure the correct order of operations on SMP machines with memory barriers. Signed-off-by: Tom Marshall Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed