Date: Mon, 29 Jan 2007 09:15:52 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 113660 for review Message-ID: <200701290915.l0T9FqLl064330@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701290915.l0T9FqLl064330>