aboutsummaryrefslogtreecommitdiffstats
path: root/net/key
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-26 19:07:34 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-11-26 19:07:34 +0800
commit8053fc3de720e1027d690f892ff7d7c1737fdd9d (patch)
tree0437efa29587beb5ebb174c402f7954cfde2269a /net/key
parent7f9c33e515353ea91afc62341161fead19e78567 (diff)
downloadkernel_goldelico_gta04-8053fc3de720e1027d690f892ff7d7c1737fdd9d.zip
kernel_goldelico_gta04-8053fc3de720e1027d690f892ff7d7c1737fdd9d.tar.gz
kernel_goldelico_gta04-8053fc3de720e1027d690f892ff7d7c1737fdd9d.tar.bz2
[IPSEC]: Temporarily remove locks around copying of non-atomic fields
The change 050f009e16f908932070313c1745d09dc69fd62b [IPSEC]: Lock state when copying non-atomic fields to user-space caused a regression. Ingo Molnar reports that it causes a potential dead-lock found by the lock validator as it tries to take x->lock within xfrm_state_lock while numerous other sites take the locks in opposite order. For 2.6.24, the best fix is to simply remove the added locks as that puts us back in the same state as we've been in for years. For later kernels a proper fix would be to reverse the locking order for every xfrm state user such that if x->lock is taken together with xfrm_state_lock then it is to be taken within it. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'net/key')
-rw-r--r--net/key/af_key.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 3b2d864..878039b 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1015,9 +1015,7 @@ static inline struct sk_buff *pfkey_xfrm_state2msg(struct xfrm_state *x)
{
struct sk_buff *skb;
- spin_lock_bh(&x->lock);
skb = __pfkey_xfrm_state2msg(x, 1, 3);
- spin_unlock_bh(&x->lock);
return skb;
}