From owner-p4-projects@FreeBSD.ORG Wed Feb 7 18:33:38 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 7D9AC16A40B; Wed, 7 Feb 2007 18:33:38 +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 87D5B16A408 for ; Wed, 7 Feb 2007 18:33:37 +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 7793313C49D for ; Wed, 7 Feb 2007 18:33:37 +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 l17IXbQn037443 for ; Wed, 7 Feb 2007 18:33:37 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l17IXbpC037440 for perforce@freebsd.org; Wed, 7 Feb 2007 18:33:37 GMT (envelope-from rdivacky@FreeBSD.org) Date: Wed, 7 Feb 2007 18:33:37 GMT Message-Id: <200702071833.l17IXbpC037440@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 114195 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: Wed, 07 Feb 2007 18:33:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=114195 Change 114195 by rdivacky@rdivacky_witten on 2007/02/07 18:33:12 Cache the em->pdeath_signal in a local variable and move the copyout out of the emul_lock coverage. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#56 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#56 (text+ko) ==== @@ -1652,6 +1652,7 @@ struct proc *p = td->td_proc; char comm[LINUX_MAX_COMM_LEN]; struct linux_emuldata *em; + int pdeath_signal; #ifdef DEBUG if (ldebug(prctl)) @@ -1671,10 +1672,11 @@ case LINUX_PR_GET_PDEATHSIG: em = em_find(p, EMUL_DOLOCK); KASSERT(em != NULL, ("prctl: emuldata not found.\n")); - error = copyout(&em->pdeath_signal, + pdeath_signal = em->pdeath_signal; + EMUL_UNLOCK(&emul_lock); + error = copyout(&pdeath_signal, (void *)(register_t)args->arg2, - sizeof(em->pdeath_signal)); - EMUL_UNLOCK(&emul_lock); + sizeof(pdeath_signal)); break; case LINUX_PR_SET_NAME: /*