panic: Fix a possible deadlock in panic()