lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1372931404.4979.88.camel@edumazet-glaptop>
Date:	Thu, 04 Jul 2013 02:50:04 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Fan Du <fan.du@...driver.com>
Cc:	steffen.klassert@...unet.com, herbert@...dor.hengli.com.au,
	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH] xfrm: replace xfrm_policy_afinfo_lock spinlock with
 mutex

On Thu, 2013-07-04 at 14:53 +0800, Fan Du wrote:
> Signed-off-by: Fan Du <fan.du@...driver.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.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ