Page MenuHomeFreeBSD

Don't enable interrupts in init_secondary().
ClosedPublic

Authored by markj on Jan 22 2020, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 7 2026, 7:57 PM
Unknown Object (File)
May 6 2026, 11:43 AM
Unknown Object (File)
May 5 2026, 4:10 PM
Unknown Object (File)
May 3 2026, 11:37 AM
Unknown Object (File)
Apr 27 2026, 8:46 AM
Unknown Object (File)
Apr 27 2026, 7:38 AM
Unknown Object (File)
Apr 25 2026, 5:25 PM
Unknown Object (File)
Apr 23 2026, 10:11 AM
Subscribers

Details

Summary

Doing so can cause deadlocks or panics during boot. In QEMU I was
seeing occasional panics during boot when a statclock interrupt
interrupted an idle thread in init_secondary(), before per-CPU scheduler
data structures were linked. It also seemed to be causing some
mysterious boot failures in AWS but I don't have console access and so
cannot confirm.

The idle threads are set up to release a spinlock section and enable
interrupts in fork_exit(), so there is no need to enable interrupts
earlier.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable