History

Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer updates from Thomas Gleixner: "The time/timekeeping/timer folks deliver with this update: - Fix a reintroduced signed/unsigned issue and cleanup the whole signed/unsigned mess in the timekeeping core so this wont happen accidentaly again. - Add a new trace clock based on boot time - Prevent injection of random sleep times when PM tracing abuses the RTC for storage - Make posix timers configurable for real tiny systems - Add tracepoints for the alarm timer subsystem so timer based suspend wakeups can be instrumented - The usual pile of fixes and updates to core and drivers" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (23 commits) timekeeping: Use mul_u64_u32_shr() instead of open coding it timekeeping: Get rid of pointless typecasts timekeeping: Make the conversion call chain consistently unsigned timekeeping_Force_unsigned_clocksource_to_nanoseconds_conversion alarmtimer: Add tracepoints for alarm timers trace: Update documentation for mono, mono_raw and boot clock trace: Add an option for boot clock as trace clock timekeeping: Add a fast and NMI safe boot clock timekeeping/clocksource_cyc2ns: Document intended range limitation timekeeping: Ignore the bogus sleep time if pm_trace is enabled selftests/timers: Fix spelling mistake "Asyncrhonous" -> "Asynchronous" clocksource/drivers/bcm2835_timer: Unmap region obtained by of_iomap clocksource/drivers/arm_arch_timer: Map frame with of_io_request_and_map() arm64: dts: rockchip: Arch counter doesn't tick in system suspend clocksource/drivers/arm_arch_timer: Don't assume clock runs in suspend posix-timers: Make them configurable posix_cpu_timers: Move the add_device_randomness() call to a proper place timer: Move sys_alarm from timer.c to itimer.c ptp_clock: Allow for it to be optional Kconfig: Regenerate *.c_shipped files after previous changes ...

Linus Torvalds committed 9 years ago

Commit 9465d9c2 parents e71c397 c029a2b61 files · +1479 −1041Browse files

Showing the changes to kernel/exit.c (1 of 61 files). Show all

Unified · Split

kernel/exit.c+13−2
@@ -54,6 +54,7 @@ · 53 unmodified lines
54#include <linux/writeback.h>54#include <linux/writeback.h>
55#include <linux/shm.h>55#include <linux/shm.h>
56#include <linux/kcov.h>56#include <linux/kcov.h>
57#include <linux/random.h>
57 58
58#include <asm/uaccess.h>59#include <asm/uaccess.h>
59#include <asm/unistd.h>60#include <asm/unistd.h>
@@ -91,11 +92,10 @@ static void __exit_signal(struct task_struct *tsk) · 31 unmodified lines
91 lockdep_tasklist_lock_is_held());92 lockdep_tasklist_lock_is_held());
92 spin_lock(&sighand->siglock);93 spin_lock(&sighand->siglock);
93 94
95#ifdef CONFIG_POSIX_TIMERS
94 posix_cpu_timers_exit(tsk);96 posix_cpu_timers_exit(tsk);
95 if (group_dead) {97 if (group_dead) {
96 posix_cpu_timers_exit_group(tsk);98 posix_cpu_timers_exit_group(tsk);
97 tty = sig->tty;
98 sig->tty = NULL;
99 } else {99 } else {
100 /*100 /*
101 * This can only happen if the caller is de_thread().101 * This can only happen if the caller is de_thread().
@@ -104,7 +104,13 @@ static void __exit_signal(struct task_struct *tsk) · 2 unmodified lines
104 */104 */
105 if (unlikely(has_group_leader_pid(tsk)))105 if (unlikely(has_group_leader_pid(tsk)))
106 posix_cpu_timers_exit_group(tsk);106 posix_cpu_timers_exit_group(tsk);
107 }
108#endif
107 109
110 if (group_dead) {
111 tty = sig->tty;
112 sig->tty = NULL;
113 } else {
108 /*114 /*
109 * If there is any task waiting for the group exit115 * If there is any task waiting for the group exit
110 * then notify it:116 * then notify it:
@@ -116,6 +122,9 @@ static void __exit_signal(struct task_struct *tsk) · 5 unmodified lines
116 sig->curr_target = next_thread(tsk);122 sig->curr_target = next_thread(tsk);
117 }123 }
118 124
125 add_device_randomness((const void*) &tsk->se.sum_exec_runtime,
126 sizeof(unsigned long long));
127
119 /*128 /*
120 * Accumulate here the counters for all threads as they die. We could129 * Accumulate here the counters for all threads as they die. We could
121 * skip the group leader because it is the last user of signal_struct,130 * skip the group leader because it is the last user of signal_struct,
@@ -799,8 +808,10 @@ void __noreturn do_exit(long code) · 677 unmodified lines
799 acct_update_integrals(tsk);808 acct_update_integrals(tsk);
800 group_dead = atomic_dec_and_test(&tsk->signal->live);809 group_dead = atomic_dec_and_test(&tsk->signal->live);
801 if (group_dead) {810 if (group_dead) {
811#ifdef CONFIG_POSIX_TIMERS
802 hrtimer_cancel(&tsk->signal->real_timer);812 hrtimer_cancel(&tsk->signal->real_timer);
803 exit_itimers(tsk->signal);813 exit_itimers(tsk->signal);
814#endif
804 if (tsk->mm)815 if (tsk->mm)
805 setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);816 setmax_mm_hiwater_rss(&tsk->signal->maxrss, tsk->mm);
806 }817 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t