diff options
Diffstat (limited to 'fs/compat.c')
-rw-r--r-- | fs/compat.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/compat.c b/fs/compat.c index 681ed81e6be0..94502dab972a 100644 --- a/fs/compat.c +++ b/fs/compat.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/smb_mount.h> | 32 | #include <linux/smb_mount.h> |
33 | #include <linux/ncp_mount.h> | 33 | #include <linux/ncp_mount.h> |
34 | #include <linux/nfs4_mount.h> | 34 | #include <linux/nfs4_mount.h> |
35 | #include <linux/smp_lock.h> | ||
36 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
37 | #include <linux/ctype.h> | 36 | #include <linux/ctype.h> |
38 | #include <linux/module.h> | 37 | #include <linux/module.h> |
@@ -471,7 +470,7 @@ asmlinkage long compat_sys_fcntl64(unsigned int fd, unsigned int cmd, | |||
471 | ret = sys_fcntl(fd, cmd, (unsigned long)&f); | 470 | ret = sys_fcntl(fd, cmd, (unsigned long)&f); |
472 | set_fs(old_fs); | 471 | set_fs(old_fs); |
473 | if (cmd == F_GETLK && ret == 0) { | 472 | if (cmd == F_GETLK && ret == 0) { |
474 | /* GETLK was successfule and we need to return the data... | 473 | /* GETLK was successful and we need to return the data... |
475 | * but it needs to fit in the compat structure. | 474 | * but it needs to fit in the compat structure. |
476 | * l_start shouldn't be too big, unless the original | 475 | * l_start shouldn't be too big, unless the original |
477 | * start + end is greater than COMPAT_OFF_T_MAX, in which | 476 | * start + end is greater than COMPAT_OFF_T_MAX, in which |
@@ -812,10 +811,8 @@ asmlinkage long compat_sys_mount(char __user * dev_name, char __user * dir_name, | |||
812 | } | 811 | } |
813 | } | 812 | } |
814 | 813 | ||
815 | lock_kernel(); | ||
816 | retval = do_mount((char*)dev_page, dir_page, (char*)type_page, | 814 | retval = do_mount((char*)dev_page, dir_page, (char*)type_page, |
817 | flags, (void*)data_page); | 815 | flags, (void*)data_page); |
818 | unlock_kernel(); | ||
819 | 816 | ||
820 | out4: | 817 | out4: |
821 | free_page(data_page); | 818 | free_page(data_page); |
@@ -1488,8 +1485,8 @@ int compat_do_execve(char * filename, | |||
1488 | if (!bprm) | 1485 | if (!bprm) |
1489 | goto out_files; | 1486 | goto out_files; |
1490 | 1487 | ||
1491 | retval = mutex_lock_interruptible(¤t->cred_exec_mutex); | 1488 | retval = -ERESTARTNOINTR; |
1492 | if (retval < 0) | 1489 | if (mutex_lock_interruptible(¤t->cred_guard_mutex)) |
1493 | goto out_free; | 1490 | goto out_free; |
1494 | current->in_execve = 1; | 1491 | current->in_execve = 1; |
1495 | 1492 | ||
@@ -1550,7 +1547,7 @@ int compat_do_execve(char * filename, | |||
1550 | /* execve succeeded */ | 1547 | /* execve succeeded */ |
1551 | current->fs->in_exec = 0; | 1548 | current->fs->in_exec = 0; |
1552 | current->in_execve = 0; | 1549 | current->in_execve = 0; |
1553 | mutex_unlock(¤t->cred_exec_mutex); | 1550 | mutex_unlock(¤t->cred_guard_mutex); |
1554 | acct_update_integrals(current); | 1551 | acct_update_integrals(current); |
1555 | free_bprm(bprm); | 1552 | free_bprm(bprm); |
1556 | if (displaced) | 1553 | if (displaced) |
@@ -1573,7 +1570,7 @@ out_unmark: | |||
1573 | 1570 | ||
1574 | out_unlock: | 1571 | out_unlock: |
1575 | current->in_execve = 0; | 1572 | current->in_execve = 0; |
1576 | mutex_unlock(¤t->cred_exec_mutex); | 1573 | mutex_unlock(¤t->cred_guard_mutex); |
1577 | 1574 | ||
1578 | out_free: | 1575 | out_free: |
1579 | free_bprm(bprm); | 1576 | free_bprm(bprm); |