patch-2.1.90 linux/fs/proc/root.c
Next file: linux/fs/super.c
Previous file: linux/fs/proc/mem.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Wed Mar 11 15:45:32 1998
- Orig file:
v2.1.89/linux/fs/proc/root.c
- Orig date:
Wed Feb 4 11:36:01 1998
diff -u --recursive --new-file v2.1.89/linux/fs/proc/root.c linux/fs/proc/root.c
@@ -14,8 +14,8 @@
#include <linux/stat.h>
#include <linux/config.h>
#include <asm/bitops.h>
-#ifdef CONFIG_KERNELD
-#include <linux/kerneld.h>
+#ifdef CONFIG_KMOD
+#include <linux/kmod.h>
#endif
/*
@@ -234,7 +234,7 @@
}
#endif
-#if defined(CONFIG_SUN_OPENPROMFS_MODULE) && defined(CONFIG_KERNELD)
+#if defined(CONFIG_SUN_OPENPROMFS_MODULE) && defined(CONFIG_KMOD)
static int
proc_openprom_defreaddir(struct inode * inode, struct file * filp,
void * dirent, filldir_t filldir)
@@ -812,14 +812,18 @@
break;
}
}
+ read_lock(&tasklist_lock);
p = find_task_by_pid(pid);
inode = NULL;
if (pid && p) {
unsigned long ino = (pid << 16) + PROC_PID_INO;
inode = proc_get_inode(dir->i_sb, ino, &proc_pid);
- if (!inode)
+ if (!inode) {
+ read_unlock(&tasklist_lock);
return -EINVAL;
+ }
}
+ read_unlock(&tasklist_lock);
dentry->d_op = &proc_dentry_operations;
d_add(dentry, inode);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov