From owner-svn-src-all@FreeBSD.ORG Sat Jun 20 05:36:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B9DD106564A; Sat, 20 Jun 2009 05:36:54 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EDF6E8FC14; Sat, 20 Jun 2009 05:36:53 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5K5ar7A065687; Sat, 20 Jun 2009 05:36:53 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5K5arb0065685; Sat, 20 Jun 2009 05:36:53 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200906200536.n5K5arb0065685@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 20 Jun 2009 05:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194524 - head/sys/ia64/ia64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2009 05:36:54 -0000 Author: marcel Date: Sat Jun 20 05:36:53 2009 New Revision: 194524 URL: http://svn.freebsd.org/changeset/base/194524 Log: Drop the high FP state of an exiting thread in cpu_thread_exit() and not in cpu_exit(). The latter is called after td_md.md_highfp_mtx has been destroyed, which results in a race condition when another thread wants to use the high FP registers on the CPU that still has the high FP registers in question. Modified: head/sys/ia64/ia64/vm_machdep.c Modified: head/sys/ia64/ia64/vm_machdep.c ============================================================================== --- head/sys/ia64/ia64/vm_machdep.c Sat Jun 20 00:54:57 2009 (r194523) +++ head/sys/ia64/ia64/vm_machdep.c Sat Jun 20 05:36:53 2009 (r194524) @@ -99,6 +99,9 @@ void cpu_thread_exit(struct thread *td) { + + /* Throw away the high FP registers. */ + ia64_highfp_drop(td); } void @@ -319,10 +322,6 @@ cpu_set_fork_handler(td, func, arg) void cpu_exit(struct thread *td) { - - /* XXX: Should this be in cpu_thread_exit() instead? */ - /* Throw away the high FP registers. */ - ia64_highfp_drop(td); } /*