Skip to content

Commit

Permalink
Skip dprintf in a DPC
Browse files Browse the repository at this point in the history
  • Loading branch information
datacore-rm committed Jul 8, 2022
1 parent 94d1426 commit 8d9eb87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions module/os/windows/zfs/zfs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ __dprintf(boolean_t dprint, const char *file, const char *func,
char *prefix = (dprint) ? "dprintf: " : "";
const char *newfile;

/*
* Skip everything if we can't write to the debug log due to
* being in a DPC.
*/
if (KeGetCurrentIrql() >= DISPATCH_LEVEL)
return;

/*
* Get rid of annoying prefix to filename.
*/
Expand Down

0 comments on commit 8d9eb87

Please sign in to comment.