Skip to content

Commit

Permalink
net: ipconfig: Wait for deferred device probes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Thomas Bogendoerfer authored and David S. Miller committed Nov 20, 2019
1 parent 2be8ca9 commit e2ffe3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit e2ffe3f

Please sign in to comment.