From owner-freebsd-current@FreeBSD.ORG Sun May 4 12:06:43 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C41A37B401; Sun, 4 May 2003 12:06:43 -0700 (PDT) Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2D3C43FA3; Sun, 4 May 2003 12:06:40 -0700 (PDT) (envelope-from charnier@xp11.frmug.org) Received: (from uucp@localhost)h44J6eU62444; Sun, 4 May 2003 21:06:40 +0200 (CEST) (envelope-from charnier@xp11.frmug.org) Received: from xp11.frmug.org (xp11.frmug.org [127.0.0.1]) h44J84wu000743; Sun, 4 May 2003 21:08:04 +0200 (CEST) (envelope-from charnier@xp11.frmug.org) Message-Id: <200305041908.h44J84wu000743@xp11.frmug.org> To: Robert Watson In-Reply-To: Message from Robert Watson Date: Sun, 04 May 2003 21:08:04 +0200 From: "Philippe Charnier" cc: current@FreeBSD.org cc: jhb@FreeBSD.org Subject: Re: panic: mutex process lock not owned at ../../../kern/sys_process.c:97 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 May 2003 19:06:43 -0000 Salut, Robert Watson wrote: >> 80 if (kl < 0) >> 81 error = EINVAL; >> 82 else >> 83 /* XXXKSE: */ >> 84 error = proc_read_regs(FIRST_THREAD_IN_PROC(p), &r); >> 85 if (error == 0) >> 86 error = uiomove(kv, kl, uio); >> 87 PROC_LOCK(p); >> 88 if (error == 0 && uio->uio_rw == UIO_WRITE) { > >Try moving the PROC_UNLOCK() call from line 79 to just after line 84 >(i.e., before the error check and possible uiomove()). It looks like some >similar bugs might exist in other bits of procfs. With your patch applied, the kernel does not panic anymore. Thanks ------ ------ Philippe Charnier charnier@{xp11.frmug.org,free.fr,FreeBSD.org} ``a PC not running FreeBSD is like a venusian with no tentacles'' ------------------------------------------------------------------------