From owner-cvs-src@FreeBSD.ORG Thu Dec 6 06:04:02 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A03AE16A419; Thu, 6 Dec 2007 06:04:02 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 759C213C43E; Thu, 6 Dec 2007 06:04:02 +0000 (UTC) (envelope-from deischen@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id lB6642kK056036; Thu, 6 Dec 2007 06:04:02 GMT (envelope-from deischen@repoman.freebsd.org) Received: (from deischen@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id lB6642Tk056035; Thu, 6 Dec 2007 06:04:02 GMT (envelope-from deischen) Message-Id: <200712060604.lB6642Tk056035@repoman.freebsd.org> From: Daniel Eischen Date: Thu, 6 Dec 2007 06:04:02 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/libkse/thread thr_kern.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2007 06:04:02 -0000 deischen 2007-12-06 06:04:02 UTC FreeBSD src repository Modified files: lib/libkse/thread thr_kern.c Log: Set the tcb (thread control block) in the child process after a fork. This protects against a race with an upcall in the parent during the fork which can clobber the parent's tcb before the vm space is copied in the child. The child then gets a corrupted tcb that is either null or that points to another thread that doesn't exist in the child (after a fork, only the fork()ing thread exists in the child). Reported by: Arno J. Klaassen (arno at heho / snv / jussieu / fr) Revision Changes Path 1.128 +13 -0 src/lib/libkse/thread/thr_kern.c