From owner-cvs-all@FreeBSD.ORG Sat Oct 9 17:10:48 2004 Return-Path: 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 D2DD116A4CE; Sat, 9 Oct 2004 17:10:48 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C926B43D41; Sat, 9 Oct 2004 17:10:48 +0000 (GMT) (envelope-from das@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i99HAmXS011789; Sat, 9 Oct 2004 17:10:48 GMT (envelope-from das@repoman.freebsd.org) Received: (from das@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i99HAmMN011788; Sat, 9 Oct 2004 17:10:48 GMT (envelope-from das) Message-Id: <200410091710.i99HAmMN011788@repoman.freebsd.org> From: David Schultz Date: Sat, 9 Oct 2004 17:10:48 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: RELENG_5 Subject: cvs commit: src/sys/i386/linux linux_ptrace.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Oct 2004 17:10:49 -0000 das 2004-10-09 17:10:48 UTC FreeBSD src repository Modified files: (Branch: RELENG_5) sys/i386/linux linux_ptrace.c Log: MFC src/sys/i386/linux/linux_ptrace.c, v1.14 | Fix the following race: | | 1. Process p1 is currently being swapped in. | 2. Process p2 calls linux_ptrace(PTRACE_GETFPXREGS, p1_pid, ...) | 3. After acquiring a reference to FIRST_THREAD_IN_PROC(p1), | p2 blocks in faultin() while p1 finishes being swapped in. | This means p2 won't get back the lock on p1 until after p1's | threads are runnable. | 4. After p1 is swapped in, the first thread in p1 exits. | 5. p2 now uses its dangling reference to p1's first thread. Approved by: re (scottl) Revision Changes Path 1.13.2.1 +4 -3 src/sys/i386/linux/linux_ptrace.c