From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.24) id 1AWvOi-0004rY-3i for user-mode-linux-devel@lists.sourceforge.net; Thu, 18 Dec 2003 02:28:48 -0800 Received: from mx2.elte.hu ([157.181.151.9]) by sc8-sf-mx1.sourceforge.net with esmtp (Exim 4.24) id 1AWvOh-0007ms-Ma for user-mode-linux-devel@lists.sourceforge.net; Thu, 18 Dec 2003 02:28:47 -0800 From: Ingo Molnar Reply-To: Ingo Molnar In-Reply-To: Message-ID: References: <20031217174901.GA6709@ccure.user-mode-linux.org> <200312180146.hBI1k1kS008213@ccure.user-mode-linux.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: [uml-devel] [patch] fix PTRACE_LDT, skas-fix-2.4.23-A0 Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Thu, 18 Dec 2003 11:27:47 +0100 (CET) To: user-mode-linux-devel@lists.sourceforge.net Cc: Jeff Dike the patch below (against the 2.4 host-skas patch) fixes a bug in the PTRACE_LDT logic: when modifying the LDT of another MM, the new LDT must not be loaded. Ingo --- linux/arch/i386/kernel/ldt.c.orig +++ linux/arch/i386/kernel/ldt.c @@ -104,7 +104,8 @@ static int write_ldt(struct task_struct wmb(); mm->context.segments = segments; mm->context.cpuvalid = 1UL << smp_processor_id(); - load_LDT(mm); + if (current->active_mm == mm) + load_LDT(mm); } lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.segments); ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel