Patchwork locking typo in xfrm_state.c

login
register
mail settings
Submitter Dan Carpenter
Date April 8, 2009, 10:45 a.m.
Message ID <alpine.DEB.2.00.0904081345430.30705@bicker>
Download mbox | patch
Permalink /patch/25725/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

Dan Carpenter - April 8, 2009, 10:45 a.m.
I'm not sure who to send this patch to.

There is a double lock instead of an unlock.

Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - April 8, 2009, 11:15 a.m.
From: Dan Carpenter <error27@gmail.com>
Date: Wed, 8 Apr 2009 13:45:48 +0300 (EAT)

> I'm not sure who to send this patch to.
> 
> There is a double lock instead of an unlock.
> 
> Found by smatch (http://repo.or.cz/w/smatch.git).  Compile tested.

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

Patch

--- orig/net/xfrm/xfrm_state.c	2009-04-08 09:19:10.000000000 +0300
+++ devel/net/xfrm/xfrm_state.c	2009-04-08 09:19:18.000000000 +0300
@@ -1615,7 +1615,7 @@ 
 
 	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);