net: ipconfig: Wait for deferred device probes
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Wed, 20 Nov 2019 16:02:36 +0000 (17:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Nov 2019 20:39:53 +0000 (12:39 -0800)
If network device drives are using deferred probing, it was possible
that waiting for devices to show up in ipconfig was already over,
when the device eventually showed up. By calling wait_for_device_probe()
we now make sure deferred probing is done before checking for available
devices.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ipconfig.c

index 32e20b7..f35308f 100644 (file)
@@ -1412,6 +1412,9 @@ static int __init wait_for_devices(void)
                struct net_device *dev;
                int found = 0;
 
+               /* make sure deferred device probes are finished */
+               wait_for_device_probe();
+
                rtnl_lock();
                for_each_netdev(&init_net, dev) {
                        if (ic_is_init_dev(dev)) {