From: Andrea Parri <andrea.parri@amarulasolutions.com>
To: Marcel Holtmann <marcel@holtmann.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Jeffy Chen <jeffy.chen@rock-chips.com>,
Brian Norris <briannorris@chromium.org>,
AL Yu-Chen Cho <acho@suse.com>
Subject: [Question] bluetooth/{bnep,cmtp,hidp}: memory barriers
Date: Mon, 30 Jul 2018 05:10:30 +0200 [thread overview]
Message-ID: <20180730031030.GA9430@andrea> (raw)
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
next reply other threads:[~2018-07-30 3:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-30 3:10 Andrea Parri [this message]
2018-08-13 23:18 ` [Question] bluetooth/{bnep,cmtp,hidp}: memory barriers Brian Norris
2018-08-14 4:26 ` JeffyChen
2018-08-14 18:33 ` Andrea Parri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180730031030.GA9430@andrea \
--to=andrea.parri@amarulasolutions.com \
--cc=acho@suse.com \
--cc=briannorris@chromium.org \
--cc=davem@davemloft.net \
--cc=jeffy.chen@rock-chips.com \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).