public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: chaitanya g <chaitanyag3.14@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux kernel : sysctl registering table under same proc name (path) gives warning and call trace while unregistering
Date: Thu, 08 Mar 2012 13:12:10 -0800	[thread overview]
Message-ID: <m1haxyyez9.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <CAOvk4sHM0buk8TW1w8n3EgnNHh6r=57RTUQXKNrCeBFcXjQ7Sg@mail.gmail.com> (chaitanya g.'s message of "Thu, 23 Feb 2012 13:04:09 +0530")

chaitanya g <chaitanyag3.14@gmail.com> writes:

> Hello there,
>
> I am creating a sysctl kernel module to register 2 hierarchy under
> same proc name. For e.g.
>
>   my_net
>   |          |
> net1  net2
>  |         |
> t1        t2
>
> So, I used register_sysctl_paths() API. Everything works fine when
> registering the sysctl tables net1 net2 under path name my_net.
>
> Problem is when unregistering the tables dmesg shows kernel tainted
> warning and a call trace.
>
> Here, is pastebin link to the warning message http://pastebin.com/NfLQhikJ
>
> Here is pastebin link to module source http://pastebin.com/jSfPW5Y5

Adding those as attachments or simple inline inclusions would have been
much easier to work with.

> Kindly, please help me to resolve this panic.

Well it wasn't a panic, it was a WARN_ON, and you are running against a
very old kernel.  The .ctl_name field no longer exists.  I guess it says
2.6.32.something.

The only possibility is you have run afoul of the current sysctl rule
that you must create a sysctl path before you add child entries and you
must destroy a sysctl path before you remove child entries.  It is
extremely non-intuitive, and should be fixed in my current sysctl tree.

Eric

      reply	other threads:[~2012-03-08 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23  7:34 Linux kernel : sysctl registering table under same proc name (path) gives warning and call trace while unregistering chaitanya g
2012-03-08 21:12 ` Eric W. Biederman [this message]

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=m1haxyyez9.fsf@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=chaitanyag3.14@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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