]> git.baikalelectronics.ru Git - kernel.git/commit
netdevsim: fib: Introduce a lock to guard nexthop hashtable
authorPetr Machata <petrm@nvidia.com>
Fri, 12 Mar 2021 16:50:17 +0000 (17:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 01:44:10 +0000 (17:44 -0800)
commited1ac4a6f68a91da7554f8ec66a82c952c035340
treef8a97afa35d53e618ffb38af2bf37d0b998a3dcf
parent645d12e52567788f57612511374164a6bd73f450
netdevsim: fib: Introduce a lock to guard nexthop hashtable

Currently netdevsim relies on RTNL to maintain exclusivity in accessing the
nexthop hash table. However, bucket notification may be called without RTNL
having been held. Instead, introduce a custom lock to guard the table.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/fib.c