mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kuznet@ms2.inr.ac.ru
To: maxk@qualcomm.com (Maksim)
Cc: linux-kernel@vger.kernel.org
Subject: Re: "new style" netdevice allocation patch for TUN driver
Date: Wed, 7 Aug 2002 02:28:44 +0400 (MSD)	[thread overview]
Message-ID: <200208062228.CAA25818@sex.inr.ac.ru> (raw)
In-Reply-To: <5.1.0.14.2.20020806135501.09799218@mail1.qualcomm.com> from "Maksim" at Aug 6, 2 02:08:37 pm

Hello!

> Please explain to me why do we have to hold rtnl lock while sleeping in
> unregister_netdevice ?

... not "while sleeping", but just "while".

If the lock would be for the device, it would be local to the device,
rather than global. The semaphore blocks all the networking configuration
until caller will complete stuff related to unregistering.

Forward references from the unregistered device under cannot be invalidated
before the device is unregistered. All such work is done after unregistry
for "old style" or in dev->uninit/destructor hooks, which are used
by "new style" devices.


> 1 - Something is not releasing device

Let's find this something! It witnesses about really serious bug.

I cannot reproduce this too. Understand, please, we _can_ follow
your proposal, all 100% of old style devices do not need uninit in real
life. But then we never will find the bug. You cannot reproduce it,
I cannot too.


> 2 - We're sleeping with the rntl_lock held

Semaphores are used exaclty when we have to sleep while holding lock.


> fix it. If one thing is buggy it doesn't mean

It means exactly this. Kernel panic would be even better, if it was
possible to detect deadlock reliably.

Alexey

  reply	other threads:[~2002-08-06 22:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-06 20:34 kuznet
2002-08-06 21:08 ` Maksim (Max) Krasnyanskiy
2002-08-06 22:28   ` kuznet [this message]
2002-08-07 19:43     ` Maksim (Max) Krasnyanskiy

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=200208062228.CAA25818@sex.inr.ac.ru \
    --to=kuznet@ms2.inr.ac.ru \
    --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®