Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.3.49 /fs/binfmt_script.c

Filename:/fs/binfmt_script.c
Lines Added:5
Lines Deleted:0
Also changed in: (Previous) 2.3.47  2.3.13  2.3.12  2.3.5  2.1.45  2.1.36 
(Following) 2.3.99-pre1  2.3.99-pre2  2.3.99-pre3 

Location
[  2.3.49
  [  fs
     o  binfmt_script.c

Patch

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);
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.