From owner-freebsd-current@FreeBSD.ORG Mon May 5 08:14:31 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 2F12237B401; Mon, 5 May 2003 08:14:31 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6053F43F93; Mon, 5 May 2003 08:14:30 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.9/8.12.9) with SMTP id h45FEd9S093279; Mon, 5 May 2003 11:14:40 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Mon, 5 May 2003 11:14:39 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Philippe Charnier In-Reply-To: <200305041908.h44J84wu000743@xp11.frmug.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: Mon, 05 May 2003 15:14:31 -0000 On Sun, 4 May 2003, Philippe Charnier wrote: > 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 Ok, I've committed the fix following John's review. Please let us know if anything else like this turns up. Thanks! Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories