Author: kib Date: Thu Nov 20 11:29:43 2014 New Revision: 274747 URL: https://svnweb.freebsd.org/changeset/base/274747
Log: MFC r274474: Do not try to dereference thread pointer when the value is not a pointer. Modified: stable/10/sys/kern/kern_lock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Thu Nov 20 11:26:06 2014 (r274746) +++ stable/10/sys/kern/kern_lock.c Thu Nov 20 11:29:43 2014 (r274747) @@ -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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"