patch-1.3.51 linux/fs/proc/array.c

Next file: linux/include/asm-i386/byteorder.h
Previous file: linux/fs/noquot.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.50/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -469,7 +469,7 @@
 	else
 		state = "RSDZTW"[tsk->state];
 	vsize = eip = esp = 0;
-	if (tsk->mm) {
+	if (tsk->mm && tsk->mm != &init_mm) {
 		struct vm_area_struct *vma = tsk->mm->mmap;
 		while (vma) {
 			vsize += vma->vm_end - vma->vm_start;
@@ -628,7 +628,7 @@
 
 	if (!p || (tsk = *p) == NULL)
 		return 0;
-	if (tsk->mm) {
+	if (tsk->mm && tsk->mm != &init_mm) {
 		struct vm_area_struct * vma = tsk->mm->mmap;
 
 		while (vma) {
@@ -692,7 +692,7 @@
 	if (!p || !*p)
 		return -EINVAL;
 
-	if (!(*p)->mm || count == 0)
+	if (!(*p)->mm || (*p)->mm == &init_mm || count == 0)
 		return 0;
 
 	/* decode f_pos */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this