patch-2.3.10 linux/fs/proc/link.c
Next file: linux/fs/proc/root.c
Previous file: linux/fs/proc/inode.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Mon Jul 5 19:59:55 1999
- Orig file:
v2.3.9/linux/fs/proc/link.c
- Orig date:
Wed Jun 30 13:38:20 1999
diff -u --recursive --new-file v2.3.9/linux/fs/proc/link.c linux/fs/proc/link.c
@@ -119,10 +119,14 @@
if (ino & PROC_PID_FD_DIR) {
struct file * file;
ino &= 0x7fff;
+ if (!p->files) /* shouldn't happen here */
+ goto out_unlock;
+ read_lock(&p->files->file_lock);
file = fcheck_task(p, ino);
if (!file || !file->f_dentry)
goto out_unlock;
result = file->f_dentry;
+ read_unlock(&p->files->file_lock);
goto out_dget;
}
}
@@ -146,6 +150,9 @@
char * tmp = (char*)__get_free_page(GFP_KERNEL), *path, *pattern;
int len;
+ if(tmp==NULL)
+ return -ENOMEM;
+
/* Check for special dentries.. */
pattern = NULL;
inode = dentry->d_inode;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)