linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Linux kernel : sysctl registering table under same proc name (path) gives warning and call trace while unregistering
@ 2012-02-23  7:34 chaitanya g
  2012-03-08 21:12 ` Eric W. Biederman
  0 siblings, 1 reply; 2+ messages in thread
From: chaitanya g @ 2012-02-23  7:34 UTC (permalink / raw)
  To: linux-kernel

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

Kindly, please help me to resolve this panic.

Thanks,
Chaitanya

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux kernel : sysctl registering table under same proc name (path) gives warning and call trace while unregistering
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Eric W. Biederman @ 2012-03-08 21:12 UTC (permalink / raw)
  To: chaitanya g; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-08 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).