panic on boot with kernel/sysctl.c changes in 2.6.27-rc5

Previous thread: [PATCH] nfsd/nfs4acl: Number of used used array elements needs to be zeroed. by Jiri Pirko on Thursday, September 4, 2008 - 7:55 am. (6 messages)

Next thread: [PATCH 1/1] HID: fix tty<->hid deadlock by Jiri Slaby on Thursday, September 4, 2008 - 8:16 am. (4 messages)
From: James Bottomley
Date: Thursday, September 4, 2008 - 8:04 am

This patch:

commit ae7edecc9b8810770a8e5cb9a466ea4bdcfa8401
Author: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Date:   Tue Jul 15 06:33:31 2008 -0400

    [PATCH] sysctl: keep track of tree relationships

Is causing a panic on boot with parisc.  The panic occurs when we try to
bring up the secondary CPUs via hotplug, so I think it's a general panic
that would be seen on any architecture.

This is what the boot shows:

Searching for devices...
Found devices:
1. Storm Peak Slow at 0xfffffffffe780000 [128] { 0, 0x0, 0x887, 0x00004 }
2. Storm Peak Slow at 0xfffffffffe781000 [129] { 0, 0x0, 0x887, 0x00004 }
3. Storm Peak Slow at 0xfffffffffe798000 [152] { 0, 0x0, 0x887, 0x00004 }
4. Storm Peak Slow at 0xfffffffffe799000 [153] { 0, 0x0, 0x887, 0x00004 }
5. Everest Mako Memory at 0xfffffffffed08000 [8] { 1, 0x0, 0x0af, 0x00009 }
6. Pluto BC McKinley Port at 0xfffffffffed00000 [0] { 12, 0x0, 0x880, 0x0000c }
7. Mercury PCI Bridge at 0xfffffffffed20000 [0/0] { 13, 0x0, 0x783, 0x0000a }
8. Mercury PCI Bridge at 0xfffffffffed22000 [0/1] { 13, 0x0, 0x783, 0x0000a }
9. Mercury PCI Bridge at 0xfffffffffed24000 [0/2] { 13, 0x0, 0x783, 0x0000a }
10. Mercury PCI Bridge at 0xfffffffffed26000 [0/3] { 13, 0x0, 0x783, 0x0000a }
11. Mercury PCI Bridge at 0xfffffffffed28000 [0/4] { 13, 0x0, 0x783, 0x0000a }
12. Mercury PCI Bridge at 0xfffffffffed2c000 [0/6] { 13, 0x0, 0x783, 0x0000a }
13. Mercury PCI Bridge at 0xfffffffffed2e000 [0/7] { 13, 0x0, 0x783, 0x0000a }
14. BMC IPMI Mgmt Ctlr at 0xfffffff0f05b0000 [16] { 15, 0x0, 0x004, 0x000c0 }
Releasing cpu 1 now, hpa=fffffffffe781000
FP[1] enabled: Rev 1 Model 20
------------[ cut here ]------------
Badness at kernel/sysctl.c:1929

     YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI
PSW: 00001000000001000001111100001111 Not tainted
r00-03  0000000008041f0f 00000000405956e0 000000004015c4bc 000000007f410d58
r04-07  0000000040589ee0 000000004048d1e4 00000000404b0040 0000000000000001
r08-11  0000000000000002 0000000040467868 0000000000000000 0000000000000000
r12-15  ...
From: Al Viro
Date: Thursday, September 4, 2008 - 9:05 am

We should've set refcount on the root sysctl table; otherwise we'll
blow up the first time we get down to zero dynamically registered sysctl
tables.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
---
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index fe47133..50ec088 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -159,6 +159,7 @@ static int proc_dointvec_taint(struct ctl_table *table, int write, struct file *
 static struct ctl_table root_table[];
 static struct ctl_table_root sysctl_table_root;
 static struct ctl_table_header root_table_header = {
+	.count = 1,
 	.ctl_table = root_table,
 	.ctl_entry = LIST_HEAD_INIT(sysctl_table_root.default_set.list),
 	.root = &amp;sysctl_table_root,
--

From: James Bottomley
Date: Thursday, September 4, 2008 - 9:15 am

That fixes the problem,

Thanks,

James


--

Previous thread: [PATCH] nfsd/nfs4acl: Number of used used array elements needs to be zeroed. by Jiri Pirko on Thursday, September 4, 2008 - 7:55 am. (6 messages)

Next thread: [PATCH 1/1] HID: fix tty<->hid deadlock by Jiri Slaby on Thursday, September 4, 2008 - 8:16 am. (4 messages)