summaryrefslogtreecommitdiff
path: root/sysdep/unix/domain.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/unix/domain.c')
-rw-r--r--sysdep/unix/domain.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdep/unix/domain.c b/sysdep/unix/domain.c
index 1cba540b..f4ee595d 100644
--- a/sysdep/unix/domain.c
+++ b/sysdep/unix/domain.c
@@ -83,11 +83,15 @@ uint dg_order(struct domain_generic *dg)
void do_lock(struct domain_generic *dg, struct domain_generic **lsp)
{
+ struct lock_order stack_copy;
+ memcpy(&stack_copy, &locking_stack, sizeof(stack_copy));
+ struct domain_generic **lll = last_locked;
+
if ((char *) lsp - (char *) &locking_stack != dg->order)
bug("Trying to lock on bad position: order=%u, lsp=%p, base=%p", dg->order, lsp, &locking_stack);
if (lsp <= last_locked)
- bug("Trying to lock in a bad order");
+ bug("Trying to lock in a bad order: %p %p", &stack_copy, lll);
if (*lsp)
bug("Inconsistent locking stack state on lock");