Re: [patch] xfrm: spin_lock() should be spin_unlock() in xfrm_state.c

Previous thread: [PATCH] af_rose/x25: Sanity check the maximum user frame size by Alan Cox on Thursday, March 26, 2009 - 2:58 pm. (2 messages)

Next thread: [PATCH] IRDA: donauboe: fix build by Alexander Beregalov on Thursday, March 26, 2009 - 6:02 pm. (2 messages)
From: Chuck Ebbert
Date: Thursday, March 26, 2009 - 3:58 pm

xfrm: spin_lock() should be spin_unlock() in xfrm_state.c

spin_lock() should be spin_unlock() in xfrm_state_walk_done().

caused by:
commit 12a169e7d8f4b1c95252d8b04ed0f1033ed7cfe2
"ipsec: Put dumpers on the dump list"

Reported-by: Marc Milgram <mmilgram@redhat.com>
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
---

--- linux-2.6.29.noarch.orig/net/xfrm/xfrm_state.c
+++ linux-2.6.29.noarch/net/xfrm/xfrm_state.c
@@ -1615,7 +1615,7 @@ void xfrm_state_walk_done(struct xfrm_st
 
 	spin_lock_bh(&xfrm_state_lock);
 	list_del(&walk->all);
-	spin_lock_bh(&xfrm_state_lock);
+	spin_unlock_bh(&xfrm_state_lock);
 }
 EXPORT_SYMBOL(xfrm_state_walk_done);
 
--

From: Herbert Xu
Date: Thursday, March 26, 2009 - 6:16 pm

Good catch!

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

From: David Miller
Date: Friday, March 27, 2009 - 12:24 am

From: Herbert Xu <herbert@gondor.apana.org.au>

Applied and queued to -stable.

I can't believe nobody hit this in all of this time :-)
--

From: Herbert Xu
Date: Friday, March 27, 2009 - 12:38 am

Indeed, now it makes nervous everytime I type ip xfrm state :)
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--

Previous thread: [PATCH] af_rose/x25: Sanity check the maximum user frame size by Alan Cox on Thursday, March 26, 2009 - 2:58 pm. (2 messages)

Next thread: [PATCH] IRDA: donauboe: fix build by Alexander Beregalov on Thursday, March 26, 2009 - 6:02 pm. (2 messages)