Applied, thanks.
I reworded the log, "fix bug" is simply not telling anything for the
future maintainers.
Damien Zammit, le ven. 26 mars 2021 20:48:48 +1100, a ecrit:
> ---
> kern/mach_clock.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/kern/mach_clock.c b/kern/mach_clock.c
> index e4d44f57..ed5cdfd3 100644
> --- a/kern/mach_clock.c
> +++ b/kern/mach_clock.c
> @@ -152,7 +152,9 @@ void clock_interrupt(
> timer_bump(&thread->user_timer, usec);
> }
> else {
> - timer_bump(&thread->system_timer, usec);
> + /* Only bump timer if thread exists */
> + if (thread)
> + timer_bump(&thread->system_timer, usec);
> }
> #endif /* STAT_TIME */
>
> @@ -189,6 +191,7 @@ void clock_interrupt(
> if (usermode)
> #endif
> {
> + if (thread)
> take_pc_sample_macro(thread, SAMPLED_PC_PERIODIC, usermode, pc);
> }
> #endif /* MACH_PCSAMPLE */
> --
> 2.30.1
>
>