From owner-svn-src-stable-10@FreeBSD.ORG Thu Nov 20 11:29:44 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B742E43A; Thu, 20 Nov 2014 11:29:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3520A2F; Thu, 20 Nov 2014 11:29:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sAKBTi2b029334; Thu, 20 Nov 2014 11:29:44 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sAKBTilP029333; Thu, 20 Nov 2014 11:29:44 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201411201129.sAKBTilP029333@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 20 Nov 2014 11:29:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r274747 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Nov 2014 11:29:44 -0000 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;