[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180730031030.GA9430@andrea>
Date: Mon, 30 Jul 2018 05:10:30 +0200
From: Andrea Parri <andrea.parri@...rulasolutions.com>
To: Marcel Holtmann <marcel@...tmann.org>,
Johan Hedberg <johan.hedberg@...il.com>,
"David S. Miller" <davem@...emloft.net>
Cc: linux-bluetooth@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jeffy Chen <jeffy.chen@...k-chips.com>,
Brian Norris <briannorris@...omium.org>,
AL Yu-Chen Cho <acho@...e.com>
Subject: [Question] bluetooth/{bnep,cmtp,hidp}: memory barriers
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
Powered by blists - more mailing lists