Skip to content

Commit

Permalink
i#2934: fix module re-walk lock order when logging (#2935)
Browse files Browse the repository at this point in the history
Fixes a regression from #2037 8471d5c where the module re-walk hits a
deadlock lock order violation if logging is enabled.

Fixes #2934
  • Loading branch information
derekbruening authored Apr 16, 2018
1 parent dfc72b8 commit e62bdc0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/unix/os.c
Original file line number Diff line number Diff line change
Expand Up @@ -9219,7 +9219,10 @@ os_walk_address_space(memquery_iter_t *iter, bool add_modules)

/* now that we've walked memory print all modules */
LOG(GLOBAL, LOG_VMAREAS, 2, "Module list after memory walk\n");
DOLOG(1, LOG_VMAREAS, { print_modules(GLOBAL, DUMP_NOT_XML); });
DOLOG(1, LOG_VMAREAS, {
if (add_modules)
print_modules(GLOBAL, DUMP_NOT_XML);
});

return count;
}
Expand Down

0 comments on commit e62bdc0

Please sign in to comment.