mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
xfrm: Fix xfrm_policy_gc_lock handling.
From: Alexey Dobriyan <adobriyan@gmail.com> Based upon a lockdep trace by Simon Arlott. xfrm_policy_kill() can be called from both BH and non-BH contexts, so we have to grab xfrm_policy_gc_lock with BH disabling. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
19ecb6ba80
commit
bbb770e7ab
1 changed files with 2 additions and 2 deletions
|
@ -315,9 +315,9 @@ static void xfrm_policy_kill(struct xfrm_policy *policy)
|
|||
return;
|
||||
}
|
||||
|
||||
spin_lock(&xfrm_policy_gc_lock);
|
||||
spin_lock_bh(&xfrm_policy_gc_lock);
|
||||
hlist_add_head(&policy->bydst, &xfrm_policy_gc_list);
|
||||
spin_unlock(&xfrm_policy_gc_lock);
|
||||
spin_unlock_bh(&xfrm_policy_gc_lock);
|
||||
|
||||
schedule_work(&xfrm_policy_gc_work);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue