diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 3b39def5471e..14545a8797a8 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c @@ -261,8 +261,10 @@ static int __init blackhole_netdev_init(void) if (!blackhole_netdev) return -ENOMEM; + rtnl_lock(); dev_init_scheduler(blackhole_netdev); dev_activate(blackhole_netdev); + rtnl_unlock(); blackhole_netdev->flags |= IFF_UP | IFF_RUNNING; dev_net_set(blackhole_netdev, &init_net);