From: David Howells <dhowells@redhat.com>
To: Baptiste Lepers <baptiste.lepers@gmail.com>
Cc: dhowells@redhat.com, davem@davemloft.net, kuba@kernel.org,
linux-afs@lists.infradead.org, netdev@vger.kernel.org
Subject: Re: [PATCH] rxrpc: Call state should be read with READ_ONCE() under some circumstances
Date: Thu, 07 Jan 2021 11:05:48 +0000 [thread overview]
Message-ID: <773322.1610017548@warthog.procyon.org.uk> (raw)
In-Reply-To: <20210107051434.12395-1-baptiste.lepers@gmail.com>
Baptiste Lepers <baptiste.lepers@gmail.com> wrote:
> The call state may be changed at any time by the data-ready routine in
> response to received packets, so if the call state is to be read and acted
> upon several times in a function, READ_ONCE() must be used unless the call
> state lock is held.
I'm going to add:
As it happens, we used READ_ONCE() to read the state a few lines above the
unmarked read in rxrpc_input_data(), so use that value rather than
re-reading it.
to the commit message, if that's okay by you.
David
next prev parent reply other threads:[~2021-01-07 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 5:14 [PATCH] rxrpc: Call state should be read with READ_ONCE() under some circumstances Baptiste Lepers
2021-01-07 11:05 ` David Howells [this message]
2021-01-07 23:23 ` Baptiste Lepers
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=773322.1610017548@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=baptiste.lepers@gmail.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.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).