patch-2.1.116 linux/fs/proc/generic.c

Next file: linux/fs/proc/root.c
Previous file: linux/fs/proc/array.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.115/linux/fs/proc/generic.c linux/fs/proc/generic.c
@@ -283,7 +283,11 @@
 extern void free_proc_entry(struct proc_dir_entry *);
 void free_proc_entry(struct proc_dir_entry *de)
 {
-	kfree(de);
+	int ino = de->low_ino;
+
+	if (ino >= PROC_DYNAMIC_FIRST &&
+	    ino < PROC_DYNAMIC_FIRST+PROC_NDYNAMIC)
+		kfree(de);
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov