patch-2.1.89 linux/fs/proc/link.c

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

diff -u --recursive --new-file v2.1.88/linux/fs/proc/link.c linux/fs/proc/link.c
@@ -105,8 +105,8 @@
 				break;
 			vma = p->mm->mmap;
 			while (vma) {
-				if (vma->vm_flags & VM_EXECUTABLE)
-					return dget(vma->vm_dentry);
+				if ((vma->vm_flags & VM_EXECUTABLE) && vma->vm_file)
+					return dget(vma->vm_file->f_dentry);
 
 				vma = vma->vm_next;
 			}

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