| To: | "David S. Miller" <davem@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [IPSEC]: Kill nested read lock by deleting xfrm_init_tempsel |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Sat, 2 Apr 2005 12:09:47 +1000 |
| Cc: | kaber@xxxxxxxxx, kuznet@xxxxxxxxxxxxx, jmorris@xxxxxxxxxx, yoshfuji@xxxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20050401172007.7296eced.davem@davemloft.net> |
| References: | <20050214221200.GA18465@gondor.apana.org.au> <20050214221433.GB18465@gondor.apana.org.au> <20050214221607.GC18465@gondor.apana.org.au> <424864CE.5060802@trash.net> <20050328233917.GB15369@gondor.apana.org.au> <424B40C2.90304@trash.net> <20050331004658.GA26395@gondor.apana.org.au> <20050331212325.5e996432.davem@davemloft.net> <20050402004956.GA24339@gondor.apana.org.au> <20050401172007.7296eced.davem@davemloft.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6+20040907i |
On Fri, Apr 01, 2005 at 05:20:07PM -0800, David S. Miller wrote: > On Sat, 2 Apr 2005 10:49:56 +1000 > Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote: > > > 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. > > read locks nest even in the presence of pending writers Doh! I should've read the code first :) It's still a valid clean-up patch though. There is another reason why it won't dead lock. We don't actually ever hold the write lock on afinfo :) Is there any reason why we dont't just use xfrm_state_afinfo_lock instead of afinfo->lock? 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 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Linux support for RDMA, jaganav |
|---|---|
| Next by Date: | Re: IPSEC: on behavior of acquire, Herbert Xu |
| Previous by Thread: | Re: [IPSEC]: Kill nested read lock by deleting xfrm_init_tempsel, David S. Miller |
| Next by Thread: | Re: [IPSEC]: Kill nested read lock by deleting xfrm_init_tempsel, Patrick McHardy |
| Indexes: | [Date] [Thread] [Top] [All Lists] |