netdev
[Top] [All Lists]

[IPSEC]: Kill nested read lock by deleting xfrm_init_tempsel

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: [IPSEC]: Kill nested read lock by deleting xfrm_init_tempsel
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 2 Apr 2005 10:49:56 +1000
Cc: kaber@xxxxxxxxx, kuznet@xxxxxxxxxxxxx, jmorris@xxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <20050331212325.5e996432.davem@xxxxxxxxxxxxx>
References: <20050214221006.GA18415@xxxxxxxxxxxxxxxxxxx> <20050214221200.GA18465@xxxxxxxxxxxxxxxxxxx> <20050214221433.GB18465@xxxxxxxxxxxxxxxxxxx> <20050214221607.GC18465@xxxxxxxxxxxxxxxxxxx> <424864CE.5060802@xxxxxxxxx> <20050328233917.GB15369@xxxxxxxxxxxxxxxxxxx> <424B40C2.90304@xxxxxxxxx> <20050331004658.GA26395@xxxxxxxxxxxxxxxxxxx> <20050331212325.5e996432.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
Hi Dave:

On Thu, Mar 31, 2005 at 09:23:25PM -0800, David S. Miller wrote:
> On Thu, 31 Mar 2005 10:46:58 +1000
> Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:
> 
> > > # This is a BitKeeper generated diff -Nru style patch.
> > > #
> > > # ChangeSet
> > > #   2005/03/30 06:02:45+02:00 kaber@xxxxxxxxxxxx 
> > > #   [IPSEC]: Check SPI in xfrm_state_find()
> > > #   
> > > #   Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
> > 
> > Looks good.
> > 
> > Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
> 
> To me too, both patches applied, thanks Patrick.

Actually I only signed off on the first patch :)

The second patch creates a dead lock since it does a nested read
lock.  The solution is simply to get rid of xfrm_init_tempsel
and call the afinfo version directly.

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

BTW I'd like to start cleaning up the locking in net/xfrm.
I don't want these changes to go into 2.6.12.  However, I'd
like to have them sit in mm for a while so that they get some
testing coverage.

What's the best way to do this? Could you create a tree slated
for 2.6.13?

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>