From owner-p4-projects@FreeBSD.ORG Mon Jan 29 09:15:53 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3B38016A405; Mon, 29 Jan 2007 09:15:53 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0E67E16A401 for ; Mon, 29 Jan 2007 09:15:53 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id F123E13C442 for ; Mon, 29 Jan 2007 09:15:52 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0T9Fqeu064333 for ; Mon, 29 Jan 2007 09:15:52 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0T9FqLl064330 for perforce@freebsd.org; Mon, 29 Jan 2007 09:15:52 GMT (envelope-from rdivacky@FreeBSD.org) Date: Mon, 29 Jan 2007 09:15:52 GMT Message-Id: <200701290915.l0T9FqLl064330@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 113660 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 09:15:53 -0000 http://perforce.freebsd.org/chv.cgi?CH=113660 Change 113660 by rdivacky@rdivacky_witten on 2007/01/29 09:15:39 Fix LOR that occurs because we acquired proctree_lock while holding emuldata lock. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#32 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#26 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#32 (text+ko) ==== @@ -613,6 +613,14 @@ error = fork1(td, ff, 0, &p2); if (error) return (error); + + if (args->flags & (CLONE_PARENT|CLONE_THREAD)) { + sx_xlock(&proctree_lock); + PROC_LOCK(p2); + proc_reparent(p2, td->td_proc->p_pptr); + PROC_UNLOCK(p2); + sx_xunlock(&proctree_lock); + } /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); @@ -632,14 +640,6 @@ } } - if (args->flags & (CLONE_PARENT|CLONE_THREAD)) { - sx_xlock(&proctree_lock); - PROC_LOCK(p2); - proc_reparent(p2, td->td_proc->p_pptr); - PROC_UNLOCK(p2); - sx_xunlock(&proctree_lock); - } - if (args->flags & CLONE_THREAD) { #ifdef notyet PROC_LOCK(p2); ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#26 (text+ko) ==== @@ -426,6 +426,14 @@ error = fork1(td, ff, 0, &p2); if (error) return (error); + + if (args->flags & (CLONE_PARENT|CLONE_THREAD)) { + sx_xlock(&proctree_lock); + PROC_LOCK(p2); + proc_reparent(p2, td->td_proc->p_pptr); + PROC_UNLOCK(p2); + sx_xunlock(&proctree_lock); + } /* create the emuldata */ error = linux_proc_init(td, p2->p_pid, args->flags); @@ -445,14 +453,6 @@ } } - if (args->flags & (CLONE_PARENT|CLONE_THREAD)) { - sx_xlock(&proctree_lock); - PROC_LOCK(p2); - proc_reparent(p2, td->td_proc->p_pptr); - PROC_UNLOCK(p2); - sx_xunlock(&proctree_lock); - } - if (args->flags & CLONE_THREAD) { #ifdef notyet PROC_LOCK(p2);