diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2017-11-14 14:51:56 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-15 06:01:30 +0100 |
commit | 11bf284f81b46f59d5f4a4522c13aa7852cfd560 (patch) | |
tree | ef75ac5dfa27442a19b463937088e7f2eeca87fb /net/ipv6/route.c | |
parent | ipv6: set all.accept_dad to 0 by default (diff) | |
download | linux-11bf284f81b46f59d5f4a4522c13aa7852cfd560.tar.xz linux-11bf284f81b46f59d5f4a4522c13aa7852cfd560.zip |
net: Protect iterations over net::fib_notifier_ops in fib_seq_sum()
There is at least unlocked deletion of net->ipv4.fib_notifier_ops
from net::fib_notifier_ops:
ip_fib_net_exit()
rtnl_unlock()
fib4_notifier_exit()
fib_notifier_ops_unregister(net->ipv4.notifier_ops)
list_del_rcu(&ops->list)
So fib_seq_sum() can't use rtnl_lock() only for protection.
The possible solution could be to use rtnl_lock()
in fib_notifier_ops_unregister(), but this adds
a possible delay during net namespace creation,
so we better use rcu_read_lock() till someone
really needs the mutex (if that happens).
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/route.c')
0 files changed, 0 insertions, 0 deletions