diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 29 |
1 files changed, 6 insertions, 23 deletions
@@ -119,7 +119,7 @@ asmlinkage long sys_uselib(const char __user * library) | |||
119 | if (error) | 119 | if (error) |
120 | goto exit; | 120 | goto exit; |
121 | 121 | ||
122 | file = nameidata_to_filp(&nd, O_RDONLY); | 122 | file = nameidata_to_filp(&nd, O_RDONLY|O_LARGEFILE); |
123 | error = PTR_ERR(file); | 123 | error = PTR_ERR(file); |
124 | if (IS_ERR(file)) | 124 | if (IS_ERR(file)) |
125 | goto out; | 125 | goto out; |
@@ -658,7 +658,8 @@ struct file *open_exec(const char *name) | |||
658 | int err = vfs_permission(&nd, MAY_EXEC); | 658 | int err = vfs_permission(&nd, MAY_EXEC); |
659 | file = ERR_PTR(err); | 659 | file = ERR_PTR(err); |
660 | if (!err) { | 660 | if (!err) { |
661 | file = nameidata_to_filp(&nd, O_RDONLY); | 661 | file = nameidata_to_filp(&nd, |
662 | O_RDONLY|O_LARGEFILE); | ||
662 | if (!IS_ERR(file)) { | 663 | if (!IS_ERR(file)) { |
663 | err = deny_write_access(file); | 664 | err = deny_write_access(file); |
664 | if (err) { | 665 | if (err) { |
@@ -782,26 +783,8 @@ static int de_thread(struct task_struct *tsk) | |||
782 | zap_other_threads(tsk); | 783 | zap_other_threads(tsk); |
783 | read_unlock(&tasklist_lock); | 784 | read_unlock(&tasklist_lock); |
784 | 785 | ||
785 | /* | 786 | /* Account for the thread group leader hanging around: */ |
786 | * Account for the thread group leader hanging around: | 787 | count = thread_group_leader(tsk) ? 1 : 2; |
787 | */ | ||
788 | count = 1; | ||
789 | if (!thread_group_leader(tsk)) { | ||
790 | count = 2; | ||
791 | /* | ||
792 | * The SIGALRM timer survives the exec, but needs to point | ||
793 | * at us as the new group leader now. We have a race with | ||
794 | * a timer firing now getting the old leader, so we need to | ||
795 | * synchronize with any firing (by calling del_timer_sync) | ||
796 | * before we can safely let the old group leader die. | ||
797 | */ | ||
798 | sig->tsk = tsk; | ||
799 | spin_unlock_irq(lock); | ||
800 | if (hrtimer_cancel(&sig->real_timer)) | ||
801 | hrtimer_restart(&sig->real_timer); | ||
802 | spin_lock_irq(lock); | ||
803 | } | ||
804 | |||
805 | sig->notify_count = count; | 788 | sig->notify_count = count; |
806 | while (atomic_read(&sig->count) > count) { | 789 | while (atomic_read(&sig->count) > count) { |
807 | __set_current_state(TASK_UNINTERRUPTIBLE); | 790 | __set_current_state(TASK_UNINTERRUPTIBLE); |
@@ -1184,7 +1167,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) | |||
1184 | { | 1167 | { |
1185 | int try,retval; | 1168 | int try,retval; |
1186 | struct linux_binfmt *fmt; | 1169 | struct linux_binfmt *fmt; |
1187 | #ifdef __alpha__ | 1170 | #if defined(__alpha__) && defined(CONFIG_ARCH_SUPPORTS_AOUT) |
1188 | /* handle /sbin/loader.. */ | 1171 | /* handle /sbin/loader.. */ |
1189 | { | 1172 | { |
1190 | struct exec * eh = (struct exec *) bprm->buf; | 1173 | struct exec * eh = (struct exec *) bprm->buf; |