Merge tag 'iwlwifi-for-kalle-2015-05-28' of https://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / net / ipv4 / tcp.c
index 59c8a027721b2d7dcd8b8631a1ed686b530b4241..8c5cd9efebbcfa877fedb49dda67e3d098ccbbc1 100644 (file)
@@ -520,8 +520,10 @@ unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait)
 
                                /* Race breaker. If space is freed after
                                 * wspace test but before the flags are set,
-                                * IO signal will be lost.
+                                * IO signal will be lost. Memory barrier
+                                * pairs with the input side.
                                 */
+                               smp_mb__after_atomic();
                                if (sk_stream_is_writeable(sk))
                                        mask |= POLLOUT | POLLWRNORM;
                        }