MFC r274474:

Do not try to dereference thread pointer when the value is not a pointer.
This commit is contained in:
kib 2014-11-20 11:29:43 +00:00
parent 941dc2c823
commit 0682b47671

View File

@ -1341,9 +1341,14 @@ lockmgr_printinfo(const struct lock *lk)
(uintmax_t)LK_SHARERS(lk->lk_lock));
else {
td = lockmgr_xholder(lk);
printf("lock type %s: EXCL by thread %p "
"(pid %d, %s, tid %d)\n", lk->lock_object.lo_name, td,
td->td_proc->p_pid, td->td_proc->p_comm, td->td_tid);
if (td == (struct thread *)LK_KERNPROC)
printf("lock type %s: EXCL by KERNPROC\n",
lk->lock_object.lo_name);
else
printf("lock type %s: EXCL by thread %p "
"(pid %d, %s, tid %d)\n", lk->lock_object.lo_name,
td, td->td_proc->p_pid, td->td_proc->p_comm,
td->td_tid);
}
x = lk->lk_lock;