diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-09-28 22:25:29 +0000 |
commit | 0ae8dceaebe3659ee0c3352c08125f403e77ebca (patch) | |
tree | 5085c389f09da78182b899d19fe1068b619a69dd /fs/proc/link.c | |
parent | 273767781288c35c9d679e908672b9996cda4c34 (diff) |
Merge with 2.3.10.
Diffstat (limited to 'fs/proc/link.c')
-rw-r--r-- | fs/proc/link.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/proc/link.c b/fs/proc/link.c index 647dc339f..6f5c63ec3 100644 --- a/fs/proc/link.c +++ b/fs/proc/link.c @@ -119,10 +119,14 @@ static struct dentry * proc_follow_link(struct dentry *dentry, 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 @@ static int do_proc_readlink(struct dentry *dentry, char * buffer, int buflen) 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; |