lkml.org 
[lkml]   [2001]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
Subjectbug in /net/core/dev.c



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 <blah> is
deferred is evidence of this behaviour occuring.

The small patch is below ,hope it is okay for you.

(See attached file: dev.c.2.4.5.patch)

D.J. Barrow Gnu/Linux for S/390 kernel developer
eMail: djbarrow@de.ibm.com,barrow_dj@yahoo.com
Phone: +49-(0)7031-16-2583
IBM Germany Lab, Schönaicherstr. 220, 71032 Böblingen
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.027 / U:0.888 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site