public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: ebiederm@xmission•com (Eric W. Biederman)
To: Bernard Pidoux <bernard.pidoux@free•fr>
Cc: linux-hams <linux-hams@vger•kernel.org>,
	Linux Netdev List <netdev@vger•kernel.org>
Subject: Re: CPU: 0 Not tainted  (3.1.9+ #1) when ifconfig rose0 down
Date: Thu, 02 Aug 2012 16:03:30 -0700	[thread overview]
Message-ID: <87vch0x5fh.fsf@xmission.com> (raw)
In-Reply-To: <5017F96B.1060701@free.fr> (Bernard Pidoux's message of "Tue, 31 Jul 2012 17:27:39 +0200")

Bernard Pidoux <bernard.pidoux@free•fr> writes:

> Here is a complementary observation.
> Trying to remove rose module with rmmod rose did not create any kernel panic.
> However, there is an endless message from the kernel saying :
>
> Message from syslogd@raspberrypi at Jul 31 17:22:40 ...
>  kernel:[  831.579007] unregister_netdevice: waiting for rose0 to become
> free. Usage count = 23
>
> Message from syslogd@raspberrypi at Jul 31 17:22:50 ...
>  kernel:[  841.739390] unregister_netdevice: waiting for rose0 to become
> free. Usage count = 23
>
> Message from syslogd@raspberrypi at Jul 31 17:23:00 ...
>  kernel:[  851.899758] unregister_netdevice: waiting for rose0 to become
> free. Usage count = 23
> .....
>
> As observed at many occasions, count number seems to be random ! and
> the same message keeps going without any change of count number.
> At the same time, there is no possibility to recover the command line on any
> console.
> However I could loggin via ssh and I noticed that rose0 device is actually no
> more in the ifconfig list.
>
> If I try to remove rose with rmmod rose I get :
>
> root@raspberrypi:/home/pi# rmmod rose
> libkmod: ERROR ../libkmod/libkmod-module.c:753 kmod_module_remove_module: could
> not remove 'rose': Device or resource busy
> Error: could not remove module rose: Device or resource busy
>
>
> Does this help ?

Something presumably in the rose code is leaking a reference to the rose
device.  That is probably a separate bug than your other one, but it may
be related.  These are some of my least favorite bugs to track down.

That said in rose there is only one call to dev_hold and only one call
to dev_put.

Hmm.  Looking at it dev_hold happens in rose_dev_get, and of which there
are several callers and only one of those callers calls dev_put.  So
it should just be a matter of adding some more dev_put calls in the
appropriate places.

The usage in rose_loopback_timer looks easy to fix, the usage in
rose_bind seems more of a challenge.

Are you enough of a developer to take that observation and look at
the code and fix it?

Eric

  parent reply	other threads:[~2012-08-02 23:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 14:11 CPU: 0 Not tainted (3.1.9+ #1) when ifconfig rose0 down Bernard Pidoux
2012-07-31 15:27 ` Bernard Pidoux
2012-07-31 17:58   ` folkert
2012-08-02 23:03   ` Eric W. Biederman [this message]
2012-07-31 17:56 ` folkert
2012-08-02 22:55 ` Eric W. Biederman
2012-08-03 14:32   ` folkert
2012-08-05 16:23     ` Bernard Pidoux
2012-08-05 17:23       ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2012-08-05 17:08 Folkert van Heusden

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=87vch0x5fh.fsf@xmission.com \
    --to=ebiederm@xmission$(echo .)com \
    --cc=bernard.pidoux@free$(echo .)fr \
    --cc=linux-hams@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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