From owner-cvs-all Sat Nov 23 0:29:46 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAD2D37B401; Sat, 23 Nov 2002 00:29:44 -0800 (PST) Received: from sccrmhc02.attbi.com (sccrmhc02.attbi.com [204.127.202.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14AF243E3B; Sat, 23 Nov 2002 00:29:44 -0800 (PST) (envelope-from julian@elischer.org) Received: from InterJet.elischer.org (12-232-168-4.client.attbi.com[12.232.168.4]) by sccrmhc02.attbi.com (sccrmhc02) with ESMTP id <2002112308294200200t42hne>; Sat, 23 Nov 2002 08:29:42 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id AAA19981; Sat, 23 Nov 2002 00:29:56 -0800 (PST) Date: Sat, 23 Nov 2002 00:29:54 -0800 (PST) From: Julian Elischer To: David Xu Cc: Maxime Henrion , "cvs-committers@FreeBSD.org" , "cvs-all@FreeBSD.org" Subject: Re: cvs commit: src/sys/kern kern_thread.c src/sys/sys proc.h src/sys/i386/i386 vm_machdep.c src/sys/alpha/alpha vm_machdep.c src/sys/ia64/ia64 vm_machdep.c src/ vm_machdep.c src/sys/sparc64/sparc64 vm_machdep.c In-Reply-To: <200211230804.gAN84ZX0003586@freefall.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 23 Nov 2002, David Xu wrote: > This commit cause kernel panic when run threaded program. > try /usr/src/tools/KSE/ksetest Maxime.. The extended PCB fields need to be freed for every thread_exit(), not just when we eventually free the thread_structure (which may never happen) > > ----- Original Message ----- > From: "Maxime Henrion" > To: ; > Sent: Saturday, November 23, 2002 7:57 AM > Subject: cvs commit: src/sys/kern kern_thread.c src/sys/sys proc.h src/sys/i386/i386 vm_machdep.c src/sys/alpha/alpha vm_machdep.c src/sys/ia64/ia64 vm_machdep.c src/sys/powerpc/powerpc vm_machdep.c src/sys/sparc64/sparc64 vm_machdep.c > > mux 2002/11/22 15:57:02 PST > > Modified files: > sys/kern kern_thread.c > sys/sys proc.h > sys/i386/i386 vm_machdep.c > sys/alpha/alpha vm_machdep.c > sys/ia64/ia64 vm_machdep.c > sys/powerpc/powerpc vm_machdep.c > sys/sparc64/sparc64 vm_machdep.c > Log: > Under certain circumstances, we were calling kmem_free() from > i386 cpu_thread_exit(). This resulted in a panic with WITNESS > since we need to hold Giant to call kmem_free(), and we weren't > helding it anymore in cpu_thread_exit(). We now do this from a > new MD function, cpu_thread_dtor(), called by thread_dtor(). > > Approved by: re@ > Suggested by: jhb > > Revision Changes Path > 1.75 +5 -0 src/sys/alpha/alpha/vm_machdep.c > 1.194 +17 -9 src/sys/i386/i386/vm_machdep.c > 1.49 +5 -0 src/sys/ia64/ia64/vm_machdep.c > 1.66 +3 -0 src/sys/kern/kern_thread.c > 1.78 +5 -0 src/sys/powerpc/powerpc/vm_machdep.c > 1.28 +5 -0 src/sys/sparc64/sparc64/vm_machdep.c > 1.283 +1 -0 src/sys/sys/proc.h > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message