]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4-sysctl-empty.patch
- added description of djurban's branch
[packages/kernel.git] / linux-2.4-sysctl-empty.patch
CommitLineData
a464038f
JB
1Don't register empty sysctl dirs in /proc/sys.
2They would be removed after registering some other sysctl(s) in the
3same directory (e.g. rtc in /proc/sys/dev) and unregistering all of
4them (then initially empty e.g. /proc/sys/dev disappears).
5After disappearing of directory topdir ->de (for "dev") points to
6structure which has been freed.
7It's harmless in vanilla 2.4, but with grsecurity causes an Oops
8on numeric sysctls referring to removed directory (even with all
9grsecurity features disabled, only patch applied).
10
11The same issue seems to exist in 2.6, and _probably_ can cause similar
12problems in selinux.
13
14 -- Jakub Bogusz <qboosh@pld-linux.org>
15
16--- linux-2.4.20/kernel/sysctl.c.orig Mon Dec 15 11:05:08 2003
17+++ linux-2.4.20/kernel/sysctl.c Mon Dec 15 15:48:46 2003
18@@ -124,10 +124,8 @@
19 #ifdef CONFIG_NET
20 extern ctl_table net_table[];
21 #endif
22-static ctl_table proc_table[];
23 static ctl_table fs_table[];
24 static ctl_table debug_table[];
25-static ctl_table dev_table[];
26 extern ctl_table random_table[];
27
28 static ctl_table grsecurity_table[];
29@@ -163,10 +161,8 @@
30 #ifdef CONFIG_NET
31 {CTL_NET, "net", NULL, 0, 0555, net_table},
32 #endif
33- {CTL_PROC, "proc", NULL, 0, 0555, proc_table},
34 {CTL_FS, "fs", NULL, 0, 0555, fs_table},
35 {CTL_DEBUG, "debug", NULL, 0, 0555, debug_table},
36- {CTL_DEV, "dev", NULL, 0, 0555, dev_table},
37 {0}
38 };
39
40@@ -488,10 +484,6 @@
41 {0}
42 };
43
44-static ctl_table proc_table[] = {
45- {0}
46-};
47-
48 static ctl_table fs_table[] = {
49 {FS_NRINODE, "inode-nr", &inodes_stat, 2*sizeof(int),
50 0444, NULL, &proc_dointvec},
51@@ -526,10 +518,6 @@
52 {0}
53 };
54
55-static ctl_table dev_table[] = {
56- {0}
57-};
58-
59 extern void init_irq_proc (void);
60
61 void __init sysctl_init(void)
This page took 0.831511 seconds and 4 git commands to generate.