Subject: Re: [PATCH] netdev: hotplug napi race cleanup

From: Stephen Hemminger <[email-masked]>
Date: Mon, 8 May 2006 12:02:24 -0700

On Mon, 08 May 2006 11:37:31 -0700 (PDT)
"David S. Miller" <[email-masked]> wrote:

> From: Stephen Hemminger <[email-masked]>
> Date: Mon, 8 May 2006 09:54:58 -0700
> 
> > The issue is are there network devices that can't sleep during
> > register_netdevice?
> 
> Oh right, I forgot about that.

We could do something like this in register_netdevice()

	if (in_atomic() || irqs_disabled())
		net_set_todo(dev);
	else {
		dev->reg_state = NETREG_REGISTERED;
		ret = netdev_register_sysfs(dev);
		if (ret) {
			... 
	}

It seems a bit grotty, and might cause pain later.