Hi Alan/Dave Here is a better version of the patch I think it cuts about 15 lines out of dev.c & I think logically it is more bulletproof than my previous attempt. (See attached file: dev.c.2.4.5.v2.patch) Hi Dave, On 390 it is very easy to hotplug devices under VM. We do it all the time using the channel device layer on s/390, so users can reconfigure devices if they misconfigure them. If it can be registered it should be able to be unregistered. Cornelia Huck in our group in boeblingen noticed the bug too. Please respond to "David S. Miller" To: Denis Joseph Barrow/Germany/Contr/IBM@IBMDE cc: linux-kernel@vger.kernel.org Subject: Re: bug in /net/core/dev.c DJBARROW@de.ibm.com writes: > The dev->refcnt will go up to 2 ( it should be 1) unregister_netdevice will > usually loop forever > waiting for the refcnt to drop to 1 when an attempt to unregister is done. When will devices built statically into the kernel ever be unregister'd? Later, David S. Miller davem@redhat.com Hi, I found this bug in dev.c It happens if register_netdevice is called before net_dev_init which can happen from init functions, when device drivers are compiled into the kernel. The dev->refcnt will go up to 2 ( it should be 1) unregister_netdevice will usually loop forever waiting for the refcnt to drop to 1 when an attempt to unregister is done. The printk in the bootmessages early initialization of device is deferred is evidence of this behaviour occuring. The small patch is below ,hope it is okay for you.