kernel: Sanity-check interrupts in snooze().
This didn't trigger any panics on my bare-metal dev install when tested, but it might explain some easily-reproducible hardlocks (i.e. can't even drop to KDL via emergency keys) I was seeing on other machines.
This commit is contained in:
@@ -1373,6 +1373,13 @@ static status_t
|
|||||||
common_snooze_etc(bigtime_t timeout, clockid_t clockID, uint32 flags,
|
common_snooze_etc(bigtime_t timeout, clockid_t clockID, uint32 flags,
|
||||||
bigtime_t* _remainingTime)
|
bigtime_t* _remainingTime)
|
||||||
{
|
{
|
||||||
|
#if KDEBUG
|
||||||
|
if (!are_interrupts_enabled()) {
|
||||||
|
panic("common_snooze_etc(): called with interrupts disabled, timeout "
|
||||||
|
"%" B_PRIdBIGTIME, timeout);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
switch (clockID) {
|
switch (clockID) {
|
||||||
case CLOCK_REALTIME:
|
case CLOCK_REALTIME:
|
||||||
// make sure the B_TIMEOUT_REAL_TIME_BASE flag is set and fall
|
// make sure the B_TIMEOUT_REAL_TIME_BASE flag is set and fall
|
||||||
|
|||||||
Reference in New Issue
Block a user