From owner-cvs-all@FreeBSD.ORG Sat Jul 7 16:59:02 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 45E5816A46E; Sat, 7 Jul 2007 16:59:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 1295613C4CA; Sat, 7 Jul 2007 16:59:02 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l67Gx1Uk036755; Sat, 7 Jul 2007 16:59:01 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from attilio@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l67Gx16o036754; Sat, 7 Jul 2007 16:59:01 GMT (envelope-from attilio) Message-Id: <200707071659.l67Gx16o036754@repoman.freebsd.org> From: Attilio Rao Date: Sat, 7 Jul 2007 16:59:01 +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/sys/i386/i386 sys_machdep.c vm_machdep.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 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, 07 Jul 2007 16:59:02 -0000 attilio 2007-07-07 16:59:01 UTC FreeBSD src repository Modified files: sys/i386/i386 sys_machdep.c vm_machdep.c Log: Actual code shows several problems in ia32 LDT handling: - When a LDT entry changes, the old one is freed while it is still referenced by gdt and ldtr. This can lead to disruptive behaviours in particular on SMP machines. - When a LDT entry changes, it is assumed that the only one entity sharing the same LDT are threads in the same proc. It doesn't take in account edge cases where two processes share the same VM (rfork'ed ones, for example). This patch addresses these two problems and addictionally it fixes the usage of refcount switching back it to the old manually-grown refcount (since in this case would be faster). Diagnosed by: tegge Tested by: pho (a former version) Reviewed by: kib Approved by: jeff (mentor) Approved by: re Revision Changes Path 1.111 +38 -32 src/sys/i386/i386/sys_machdep.c 1.283 +1 -2 src/sys/i386/i386/vm_machdep.c