mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jacek Konieczny <jajcus@bnet.pl>
To: "Maksim (Max) Krasnyanskiy" <maxk@qualcomm.com>
Cc: davem@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: "new style" netdevice allocation patch for TUN driver (2.4.18 kernel)
Date: Tue, 6 Aug 2002 19:29:21 +0200	[thread overview]
Message-ID: <20020806172921.GC22436@nic.nigdzie> (raw)
In-Reply-To: <5.1.0.14.2.20020806094253.09734790@mail1.qualcomm.com>

On Tue, Aug 06, 2002 at 10:07:49AM -0700, Maksim (Max) Krasnyanskiy wrote:
> >I will not see "waiting for" warning, but I will also be able to control
> >all other network devices. Without this "fix" I am not able to shutdown
> >network at all. Every "ip" command just hangs forever.
> Yeah, this should be fixed. unregister_netdevice() sleeps under rtnl_lock().
> Which means that any other activity that needs this lock will be blocked.
I am happy, that someone (smarter than me) seems to be interested in
fixing this bug :-)

> >But it seems it is eventually called. The refcount eventually goes to 0
> >(1 in factm - selfreference). Without this patch it never went to 0, as
> >system shutdown was stopped "waitnig for...".
> It'd be nice to trace what part of the kernel is actually holding refcount.
If I ever find something more precise I'll write.

> >was bug-free. With this patch it is more bug-proof.
> :) No, the point of device destructors is not to hide kernel bugs.
>[...]
> for a long time after deregistration. I may very well be doing it for a 
> good reason but warning is helpful anyway.
I undarstand this. Even with my (now I know - broken) patch kernel warns
that device is in use, and that destruction will be delayed.
But you are right, warning displayed every 3 seconds, when nothing else
works is much easier to notice :-)

> And we should fix sleep in unregister_netdevice() (ie patch above).
I think this would be enough for me. 

Greets,
        Jacek

  parent reply	other threads:[~2002-08-06 17:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-01 13:35 Jacek Konieczny
2002-08-02 23:54 ` Maksim (Max) Krasnyanskiy
     [not found] ` <20020803140858.GA5314@nic.nigdzie>
2002-08-06 17:07   ` Maksim (Max) Krasnyanskiy
2002-08-06 17:07     ` David S. Miller
2002-08-06 20:03       ` Maksim (Max) Krasnyanskiy
2002-08-06 17:29     ` Jacek Konieczny [this message]
2002-08-07  3:10 Julian Anastasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020806172921.GC22436@nic.nigdzie \
    --to=jajcus@bnet.pl \
    --cc=davem@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxk@qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®