diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |