From: Steffen Klassert <steffen.klassert@secunet.com>
To: Florian Westphal <fw@strlen.de>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH ipsec-next 0/6] xfrm: remove xfrm_state_get_afinfo conditional rcu locking
Date: Wed, 11 Jan 2017 13:17:37 +0100 [thread overview]
Message-ID: <20170111121737.GF3541@gauss.secunet.com> (raw)
In-Reply-To: <1483968050-788-1-git-send-email-fw@strlen.de>
On Mon, Jan 09, 2017 at 02:20:44PM +0100, Florian Westphal wrote:
> xfrm_state_get_afinfo still uses a conditional locking scheme
> dating back to when this still used an rwlock:
>
> If return value is NULL, no lock (rcu readlock) was taken,
> otherwise, rcu_read_unlock has to be called.
>
> This series moves rcu read lock/unlock responsibility to the callers.
>
> xfrm_state_put_afinfo is removed (it is equivalent
> to rcu_read_unlock so thats what will be used instead).
>
> xfrm_state_get_afinfo is renamed to xfrm_state_afinfo_get_rcu()
> and is only a rcu dereference wrapper.
>
> In one case, rcu read/unlock can be avoided as we're always
> called with rcu read lock held.
All applied to ipsec-next, thanks a lot!
prev parent reply other threads:[~2017-01-11 12:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 13:20 [PATCH ipsec-next 0/6] xfrm: remove xfrm_state_get_afinfo conditional rcu locking Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 1/6] xfrm: remove unused function Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 2/6] xfrm: avoid rcu sparse warning Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 3/6] xfrm: remove xfrm_state_put_afinfo Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 4/6] xfrm: add and use xfrm_state_afinfo_get_rcu Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 5/6] xfrm: state: simplify rcu_read_unlock handling in two spots Florian Westphal
2017-01-09 13:20 ` [PATCH ipsec-next 6/6] xfrm: remove xfrm_state_get_afinfo Florian Westphal
2017-01-11 12:17 ` Steffen Klassert [this message]
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=20170111121737.GF3541@gauss.secunet.com \
--to=steffen.klassert@secunet.com \
--cc=fw@strlen.de \
--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).