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


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" <davem@redhat.com>

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

The small patch is below ,hope it is okay for you.
[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 12:55    [W:0.056 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site