Commit 99469c32f79a32d8481f87be0d3c66dad286f4ec
Committed by
David S. Miller
1 parent
e2c53be223
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
l2tp: avoid to use synchronize_rcu in tunnel free function
Avoid to use synchronize_rcu in l2tp_tunnel_free because context may be atomic. Signed-off-by: Dmitry Kozlov <xeb@mail.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff
net/l2tp/l2tp_core.c
... | ... | @@ -1347,11 +1347,10 @@ |
1347 | 1347 | /* Remove from tunnel list */ |
1348 | 1348 | spin_lock_bh(&pn->l2tp_tunnel_list_lock); |
1349 | 1349 | list_del_rcu(&tunnel->list); |
1350 | + kfree_rcu(tunnel, rcu); | |
1350 | 1351 | spin_unlock_bh(&pn->l2tp_tunnel_list_lock); |
1351 | - synchronize_rcu(); | |
1352 | 1352 | |
1353 | 1353 | atomic_dec(&l2tp_tunnel_count); |
1354 | - kfree(tunnel); | |
1355 | 1354 | } |
1356 | 1355 | |
1357 | 1356 | /* Create a socket for the tunnel, if one isn't set up by |
net/l2tp/l2tp_core.h