linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] bluetooth/{bnep,cmtp,hidp}: memory barriers
@ 2018-07-30  3:10 Andrea Parri
  2018-08-13 23:18 ` Brian Norris
  0 siblings, 1 reply; 4+ messages in thread
From: Andrea Parri @ 2018-07-30  3:10 UTC (permalink / raw)
  To: Marcel Holtmann, Johan Hedberg, David S. Miller
  Cc: linux-bluetooth, netdev, linux-kernel, Jeffy Chen, Brian Norris,
	AL Yu-Chen Cho

Hi,

I'm currently puzzled by the the three calls to smp_mb__before_atomic()
in bnep_session(), cmtp_session() and hidp_session_run() respectively:

On the one hand, these barriers provide no guarantee on the subsequent
atomic_read(s->terminate) (as the comments preceding the barriers seem
to suggest), because atomic_read() is not a read-modify-write.

On the other hand, I'm currently unable to say *why such an "mb" would
be required: not being too familiar with this code, I figured I should
ask before sending a patch.  ;-)

  Andrea

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

end of thread, other threads:[~2018-08-14 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30  3:10 [Question] bluetooth/{bnep,cmtp,hidp}: memory barriers Andrea Parri
2018-08-13 23:18 ` Brian Norris
2018-08-14  4:26   ` JeffyChen
2018-08-14 18:33     ` Andrea Parri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).