]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
xfrm: Fix xfrm_policy_lock imbalance
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 24 Aug 2016 11:08:40 +0000 (13:08 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 24 Aug 2016 11:13:08 +0000 (13:13 +0200)
An earlier patch accidentally replaced a write_lock_bh
with a spin_unlock_bh. Fix this by using spin_lock_bh
instead.

Fixes: 9d0380df6217 ("xfrm: policy: convert policy_lock to spinlock")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c

index dd01fd2e55fab03cb3fde90b105ac40936bb9ecf..f7ce6265961a5ca70a8b30c1c39ac1df27c85bb4 100644 (file)
@@ -979,7 +979,7 @@ int xfrm_policy_flush(struct net *net, u8 type, bool task_valid)
 
                        xfrm_policy_kill(pol);
 
-                       spin_unlock_bh(&net->xfrm.xfrm_policy_lock);
+                       spin_lock_bh(&net->xfrm.xfrm_policy_lock);
                        goto again1;
                }