| Kernel v2.3.49 /fs/binfmt_script.c |
|---|
 2.3.49
 fs
 binfmt_script.c
diff -u --recursive --new-file v2.3.48/linux/fs/binfmt_script.c linux/fs/binfmt_script.c
--- v2.3.48/linux/fs/binfmt_script.c Sun Feb 20 21:12:39 2000
+++ linux/fs/binfmt_script.c Tue Feb 29 11:13:27 2000
@@ -11,6 +11,7 @@
#include <linux/malloc.h>
#include <linux/binfmts.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
static int do_load_script(struct linux_binprm *bprm,struct pt_regs *regs)
{
@@ -27,7 +28,9 @@
*/
bprm->sh_bang++;
+ lock_kernel();
dput(bprm->dentry);
+ unlock_kernel();
bprm->dentry = NULL;
bprm->buf[127] = '\0';
@@ -78,7 +81,9 @@
/*
* OK, now restart the process with the interpreter's dentry.
*/
+ lock_kernel();
dentry = open_namei(interp, 0, 0);
+ unlock_kernel();
if (IS_ERR(dentry))
return PTR_ERR(dentry);
|