public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Fan Du <fan.du@windriver.com>
Cc: steffen.klassert@secunet.com, herbert@gondor.hengli.com.au,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH] xfrm: replace xfrm_policy_afinfo_lock spinlock with mutex
Date: Thu, 04 Jul 2013 02:50:04 -0700	[thread overview]
Message-ID: <1372931404.4979.88.camel@edumazet-glaptop> (raw)
In-Reply-To: <1372920827-4144-1-git-send-email-fan.du@windriver.com>

On Thu, 2013-07-04 at 14:53 +0800, Fan Du wrote:
> Signed-off-by: Fan Du <fan.du@windriver.com>
> ---
>  net/xfrm/xfrm_policy.c |   10 +++++-----
>  1 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
> index e52cab3..27768ba 100644
> --- a/net/xfrm/xfrm_policy.c
> +++ b/net/xfrm/xfrm_policy.c
> @@ -46,7 +46,7 @@ static DEFINE_SPINLOCK(xfrm_policy_sk_bundle_lock);
>  static struct dst_entry *xfrm_policy_sk_bundles;
>  static DEFINE_RWLOCK(xfrm_policy_lock);
>  
> -static DEFINE_SPINLOCK(xfrm_policy_afinfo_lock);
> +static DEFINE_MUTEX(xfrm_policy_afinfo_lock);

Why is it needed, and why is it safe ?

Is it a bug fix ? If answer is no please read : 

http://www.spinics.net/lists/netdev/msg242161.html

This mutex or spinlock is not really needed anyway.

Check commit e0386005ff2a729 for a starting point.
("net: inet_add_protocol() can use cmpxchg()")

But do not send a patch until David reopens net-next.

      parent reply	other threads:[~2013-07-04  9:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-04  6:53 [PATCH] xfrm: replace xfrm_policy_afinfo_lock spinlock with mutex Fan Du
2013-07-04  7:54 ` Cong Wang
2013-07-04  9:50 ` Eric Dumazet [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=1372931404.4979.88.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fan.du@windriver.com \
    --cc=herbert@gondor.hengli.com.au \
    --cc=netdev@vger.kernel.org \
    --cc=steffen.klassert@secunet.com \
    /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