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.36-rc6~6^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4d258036ed9b2a1811c3670c6099203a0f284a0;p=pandora-kernel.git tcp: Fix race in tcp_poll 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 --- Reading git-diff-tree failed