Skip to content

Commit

Permalink
Dump log from current process when required
Browse files Browse the repository at this point in the history
When dumping a debug log first check that it is safe to create
a new thread and block waiting for it.  If we are in an atomic
context or irqs and disabled it is not safe to sleep and we
must write out of the debug log from the current process.
  • Loading branch information
behlendorf committed Apr 23, 2010
1 parent d05ec4b commit 97f8f6d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/spl/spl-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,6 +1112,9 @@ void spl_debug_bug(char *file, const char *func, const int line, int flags)
/* not reached */
}

if (in_atomic() || irqs_disabled())
flags |= DL_NOTHREAD;

/* Ensure all debug pages and dumped by current cpu */
if (spl_debug_panic_on_bug)
spl_panic_in_progress = 1;
Expand Down

0 comments on commit 97f8f6d

Please sign in to comment.