Don't be lazy in the locking in SYSCALL_DEBUG code. KERNEL_PROC_UNLOCK is not safe for recursion (becuase it clears P_BIGLOCK) so we have to make that lock conditional as well.
Don't be lazy in the locking in SYSCALL_DEBUG code.
KERNEL_PROC_UNLOCK is not safe for recursion (becuase it clears P_BIGLOCK)
so we have to make that lock conditional as well.

Found by tholo@ when reviewing the i386 diff.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars