All of lore.kernel.org
 help / color / mirror / Atom feed
* wrong smp_mb__after_atomic() in tcp_check_space() ?
@ 2017-01-23 14:30 Oleg Nesterov
  2017-01-23 16:56 ` Jason Baron
  0 siblings, 1 reply; 6+ messages in thread
From: Oleg Nesterov @ 2017-01-23 14:30 UTC (permalink / raw)
  To: Jason Baron, David S. Miller; +Cc: Herbert Xu, Yauheni Kaliuta, netdev

Hello,

smp_mb__after_atomic() looks wrong and misleading, sock_reset_flag() does the
non-atomic __clear_bit() and thus it can not guarantee test_bit(SOCK_NOSPACE)
(non-atomic too) won't be reordered.

It was added by 3c7151275c0c9a "tcp: add memory barriers to write space paths"
and the patch looks correct in that we need the barriers in tcp_check_space()
and tcp_poll() in theory, so it seems tcp_check_space() needs smp_mb() ?

Oleg.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-24  9:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-23 14:30 wrong smp_mb__after_atomic() in tcp_check_space() ? Oleg Nesterov
2017-01-23 16:56 ` Jason Baron
2017-01-23 17:18   ` Oleg Nesterov
2017-01-23 18:04   ` Eric Dumazet
2017-01-23 18:45     ` Jason Baron
2017-01-24  9:18     ` Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.