diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -234,7 +234,7 @@ static int __bprm_mm_init(struct linux_binprm *bprm) | |||
234 | vma->vm_start = vma->vm_end - PAGE_SIZE; | 234 | vma->vm_start = vma->vm_end - PAGE_SIZE; |
235 | 235 | ||
236 | vma->vm_flags = VM_STACK_FLAGS; | 236 | vma->vm_flags = VM_STACK_FLAGS; |
237 | vma->vm_page_prot = protection_map[vma->vm_flags & 0x7]; | 237 | vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); |
238 | err = insert_vm_struct(mm, vma); | 238 | err = insert_vm_struct(mm, vma); |
239 | if (err) { | 239 | if (err) { |
240 | up_write(&mm->mmap_sem); | 240 | up_write(&mm->mmap_sem); |
@@ -775,8 +775,8 @@ static int de_thread(struct task_struct *tsk) | |||
775 | * Reparenting needs write_lock on tasklist_lock, | 775 | * Reparenting needs write_lock on tasklist_lock, |
776 | * so it is safe to do it under read_lock. | 776 | * so it is safe to do it under read_lock. |
777 | */ | 777 | */ |
778 | if (unlikely(tsk->group_leader == child_reaper(tsk))) | 778 | if (unlikely(tsk->group_leader == task_child_reaper(tsk))) |
779 | tsk->nsproxy->pid_ns->child_reaper = tsk; | 779 | task_active_pid_ns(tsk)->child_reaper = tsk; |
780 | 780 | ||
781 | zap_other_threads(tsk); | 781 | zap_other_threads(tsk); |
782 | read_unlock(&tasklist_lock); | 782 | read_unlock(&tasklist_lock); |
@@ -841,8 +841,8 @@ static int de_thread(struct task_struct *tsk) | |||
841 | */ | 841 | */ |
842 | tsk->start_time = leader->start_time; | 842 | tsk->start_time = leader->start_time; |
843 | 843 | ||
844 | BUG_ON(leader->tgid != tsk->tgid); | 844 | BUG_ON(!same_thread_group(leader, tsk)); |
845 | BUG_ON(tsk->pid == tsk->tgid); | 845 | BUG_ON(has_group_leader_pid(tsk)); |
846 | /* | 846 | /* |
847 | * An exec() starts a new thread group with the | 847 | * An exec() starts a new thread group with the |
848 | * TGID of the previous thread group. Rehash the | 848 | * TGID of the previous thread group. Rehash the |
@@ -857,7 +857,7 @@ static int de_thread(struct task_struct *tsk) | |||
857 | */ | 857 | */ |
858 | detach_pid(tsk, PIDTYPE_PID); | 858 | detach_pid(tsk, PIDTYPE_PID); |
859 | tsk->pid = leader->pid; | 859 | tsk->pid = leader->pid; |
860 | attach_pid(tsk, PIDTYPE_PID, find_pid(tsk->pid)); | 860 | attach_pid(tsk, PIDTYPE_PID, task_pid(leader)); |
861 | transfer_pid(leader, tsk, PIDTYPE_PGID); | 861 | transfer_pid(leader, tsk, PIDTYPE_PGID); |
862 | transfer_pid(leader, tsk, PIDTYPE_SID); | 862 | transfer_pid(leader, tsk, PIDTYPE_SID); |
863 | list_replace_rcu(&leader->tasks, &tsk->tasks); | 863 | list_replace_rcu(&leader->tasks, &tsk->tasks); |
@@ -1433,7 +1433,7 @@ static int format_corename(char *corename, const char *pattern, long signr) | |||
1433 | case 'p': | 1433 | case 'p': |
1434 | pid_in_pattern = 1; | 1434 | pid_in_pattern = 1; |
1435 | rc = snprintf(out_ptr, out_end - out_ptr, | 1435 | rc = snprintf(out_ptr, out_end - out_ptr, |
1436 | "%d", current->tgid); | 1436 | "%d", task_tgid_vnr(current)); |
1437 | if (rc > out_end - out_ptr) | 1437 | if (rc > out_end - out_ptr) |
1438 | goto out; | 1438 | goto out; |
1439 | out_ptr += rc; | 1439 | out_ptr += rc; |
@@ -1513,7 +1513,7 @@ static int format_corename(char *corename, const char *pattern, long signr) | |||
1513 | if (!ispipe && !pid_in_pattern | 1513 | if (!ispipe && !pid_in_pattern |
1514 | && (core_uses_pid || atomic_read(¤t->mm->mm_users) != 1)) { | 1514 | && (core_uses_pid || atomic_read(¤t->mm->mm_users) != 1)) { |
1515 | rc = snprintf(out_ptr, out_end - out_ptr, | 1515 | rc = snprintf(out_ptr, out_end - out_ptr, |
1516 | ".%d", current->tgid); | 1516 | ".%d", task_tgid_vnr(current)); |
1517 | if (rc > out_end - out_ptr) | 1517 | if (rc > out_end - out_ptr) |
1518 | goto out; | 1518 | goto out; |
1519 | out_ptr += rc; | 1519 | out_ptr += rc; |