Maximus Minter, le mar. 07 avril 2026 22:30:33 -0400, a ecrit:
> - Initialize spin locks in panic_init (debug.c)
> 
> diff --git a/kern/debug.c b/kern/debug.c
> index eec2f148..8da63d92 100644
> --- a/kern/debug.c
> +++ b/kern/debug.c
> @@ -41,7 +41,7 @@
>  #include <device/cons.h>
>  
>  #if NCPUS>1
> -simple_lock_irq_data_t Assert_print_lock; /* uninited, we take our chances */
> +simple_lock_irq_data_t Assert_print_lock;
>  #endif
>  
>  static void
> @@ -120,6 +120,10 @@ int                      paniccpu;
>  void
>  panic_init(void)
>  {
> +#if NCPUS > 1
> +     simple_lock_init(&Assert_print_lock);
> +#endif
> +     simple_lock_init(&panic_lock);
>  }
>  
>  #if ! MACH_KBD
> @@ -204,4 +208,4 @@ void
>  __stack_chk_fail (void)
>  {
>       panic("stack smashing detected");
> -}
> +}
> \ No newline at end of file

Applied, thanks!

(better split patches, so it's way easier for me to apply the pieces
that are actually correct)

Samuel

Reply via email to