]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/ipv4/tcp_input.c
tcp: Fix race in tcp_poll
[net-next-2.6.git] / net / ipv4 / tcp_input.c
index e663b78a2ef6b6286b549aa65b418fe385f32184..149e79ac289181fba7cb375c3dac833fdd56d711 100644 (file)
@@ -4048,6 +4048,8 @@ static void tcp_reset(struct sock *sk)
        default:
                sk->sk_err = ECONNRESET;
        }
+       /* This barrier is coupled with smp_rmb() in tcp_poll() */
+       smp_wmb();
 
        if (!sock_flag(sk, SOCK_DEAD))
                sk->sk_error_report(sk);