All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: ipconfig: Wait for deferred device probes
@ 2019-11-20 16:02 Thomas Bogendoerfer
  2019-11-20 20:40 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bogendoerfer @ 2019-11-20 16:02 UTC (permalink / raw)
  To: David S. Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI, netdev,
	linux-kernel

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>
---
 net/ipv4/ipconfig.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 9bcca08efec9..49b2381e857e 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -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)) {
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: ipconfig: Wait for deferred device probes
  2019-11-20 16:02 [PATCH net-next] net: ipconfig: Wait for deferred device probes Thomas Bogendoerfer
@ 2019-11-20 20:40 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-11-20 20:40 UTC (permalink / raw)
  To: tbogendoerfer; +Cc: kuznet, yoshfuji, netdev, linux-kernel

From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Date: Wed, 20 Nov 2019 17:02:36 +0100

> 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>
 ...
> +		/* make sure deferred device probes are finished */
> +		wait_for_device_probe();
> +

So much nicer, right? :-)

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-11-20 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 16:02 [PATCH net-next] net: ipconfig: Wait for deferred device probes Thomas Bogendoerfer
2019-11-20 20:40 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.