diff options
author | David S. Miller <davem@davemloft.net> | 2010-09-27 10:03:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-27 10:03:03 +0200 |
commit | e40051d134f7ee95c8c1f7a3471e84eafc9ab326 (patch) | |
tree | 88eb44e49a75721ae926665a2c42f08badac9d07 /net/ipv4/tcp.c | |
parent | net: r6040: store BIOS default MAC in perm_add (diff) | |
parent | ipv6: add a missing unregister_pernet_subsys call (diff) | |
download | linux-e40051d134f7ee95c8c1f7a3471e84eafc9ab326.tar.xz linux-e40051d134f7ee95c8c1f7a3471e84eafc9ab326.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/qlcnic/qlcnic_init.c
net/ipv4/ip_output.c
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 3e8a4dbc721b..19192c5fe67a 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -386,8 +386,6 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) */ mask = 0; - if (sk->sk_err) - mask = POLLERR; /* * POLLHUP is certainly not done right. But poll() doesn't @@ -457,6 +455,11 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) if (tp->urg_data & TCP_URG_VALID) mask |= POLLPRI; } + /* This barrier is coupled with smp_wmb() in tcp_reset() */ + smp_rmb(); + if (sk->sk_err) + mask |= POLLERR; + return mask; } EXPORT_SYMBOL(tcp_poll); |