mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Do not try to dereference thread pointer when the value is not a pointer.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
f2c1a52afb
commit
e64b4fa858
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274474
@ -1360,9 +1360,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;
|
||||
|
Loading…
Reference in New Issue
Block a user