diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -324,7 +324,7 @@ void install_arg_page(struct vm_area_struct *vma, | |||
324 | lru_cache_add_active(page); | 324 | lru_cache_add_active(page); |
325 | set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte( | 325 | set_pte_at(mm, address, pte, pte_mkdirty(pte_mkwrite(mk_pte( |
326 | page, vma->vm_page_prot)))); | 326 | page, vma->vm_page_prot)))); |
327 | page_add_anon_rmap(page, vma, address); | 327 | page_add_new_anon_rmap(page, vma, address); |
328 | pte_unmap_unlock(pte, ptl); | 328 | pte_unmap_unlock(pte, ptl); |
329 | 329 | ||
330 | /* no need for flush_tlb */ | 330 | /* no need for flush_tlb */ |
@@ -632,10 +632,10 @@ static inline int de_thread(struct task_struct *tsk) | |||
632 | * synchronize with any firing (by calling del_timer_sync) | 632 | * synchronize with any firing (by calling del_timer_sync) |
633 | * before we can safely let the old group leader die. | 633 | * before we can safely let the old group leader die. |
634 | */ | 634 | */ |
635 | sig->real_timer.data = (unsigned long)current; | 635 | sig->real_timer.data = current; |
636 | spin_unlock_irq(lock); | 636 | spin_unlock_irq(lock); |
637 | if (del_timer_sync(&sig->real_timer)) | 637 | if (hrtimer_cancel(&sig->real_timer)) |
638 | add_timer(&sig->real_timer); | 638 | hrtimer_restart(&sig->real_timer); |
639 | spin_lock_irq(lock); | 639 | spin_lock_irq(lock); |
640 | } | 640 | } |
641 | while (atomic_read(&sig->count) > count) { | 641 | while (atomic_read(&sig->count) > count) { |
@@ -760,7 +760,7 @@ no_thread_group: | |||
760 | spin_lock(&oldsighand->siglock); | 760 | spin_lock(&oldsighand->siglock); |
761 | spin_lock(&newsighand->siglock); | 761 | spin_lock(&newsighand->siglock); |
762 | 762 | ||
763 | current->sighand = newsighand; | 763 | rcu_assign_pointer(current->sighand, newsighand); |
764 | recalc_sigpending(); | 764 | recalc_sigpending(); |
765 | 765 | ||
766 | spin_unlock(&newsighand->siglock); | 766 | spin_unlock(&newsighand->siglock); |
@@ -768,7 +768,7 @@ no_thread_group: | |||
768 | write_unlock_irq(&tasklist_lock); | 768 | write_unlock_irq(&tasklist_lock); |
769 | 769 | ||
770 | if (atomic_dec_and_test(&oldsighand->count)) | 770 | if (atomic_dec_and_test(&oldsighand->count)) |
771 | kmem_cache_free(sighand_cachep, oldsighand); | 771 | sighand_free(oldsighand); |
772 | } | 772 | } |
773 | 773 | ||
774 | BUG_ON(!thread_group_leader(current)); | 774 | BUG_ON(!thread_group_leader(current)); |
@@ -1462,6 +1462,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) | |||
1462 | if (!(current->signal->flags & SIGNAL_GROUP_EXIT)) { | 1462 | if (!(current->signal->flags & SIGNAL_GROUP_EXIT)) { |
1463 | current->signal->flags = SIGNAL_GROUP_EXIT; | 1463 | current->signal->flags = SIGNAL_GROUP_EXIT; |
1464 | current->signal->group_exit_code = exit_code; | 1464 | current->signal->group_exit_code = exit_code; |
1465 | current->signal->group_stop_count = 0; | ||
1465 | retval = 0; | 1466 | retval = 0; |
1466 | } | 1467 | } |
1467 | spin_unlock_irq(¤t->sighand->siglock); | 1468 | spin_unlock_irq(¤t->sighand->siglock); |
@@ -1477,7 +1478,6 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) | |||
1477 | * Clear any false indication of pending signals that might | 1478 | * Clear any false indication of pending signals that might |
1478 | * be seen by the filesystem code called to write the core file. | 1479 | * be seen by the filesystem code called to write the core file. |
1479 | */ | 1480 | */ |
1480 | current->signal->group_stop_count = 0; | ||
1481 | clear_thread_flag(TIF_SIGPENDING); | 1481 | clear_thread_flag(TIF_SIGPENDING); |
1482 | 1482 | ||
1483 | if (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) | 1483 | if (current->signal->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) |
@@ -1505,7 +1505,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs) | |||
1505 | goto close_fail; | 1505 | goto close_fail; |
1506 | if (!file->f_op->write) | 1506 | if (!file->f_op->write) |
1507 | goto close_fail; | 1507 | goto close_fail; |
1508 | if (do_truncate(file->f_dentry, 0, file) != 0) | 1508 | if (do_truncate(file->f_dentry, 0, 0, file) != 0) |
1509 | goto close_fail; | 1509 | goto close_fail; |
1510 | 1510 | ||
1511 | retval = binfmt->core_dump(signr, regs, file); | 1511 | retval = binfmt->core_dump(signr, regs, file); |