x86/ldt: Further fix FPU emulation
authorAndy Lutomirski <luto@kernel.org>
Fri, 14 Aug 2015 22:02:55 +0000 (15:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 16 Aug 2015 22:11:05 +0000 (15:11 -0700)
The previous fix confused a selector with a segment prefix.  Fix it.

Compile-tested only.

Cc: stable@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Fixes: 4809146b86c3 ("x86/ldt: Correct FPU emulation access to LDT")
Signed-off-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/math-emu/get_address.c

index d13cab2aec454ecfecda32599f9939e5891cf126..8300db71c2a62681006e137350961742190ec9dc 100644 (file)
@@ -157,7 +157,7 @@ static long pm_address(u_char FPU_modrm, u_char segment,
                addr->selector = PM_REG_(segment);
        }
 
-       descriptor = FPU_get_ldt_descriptor(segment);
+       descriptor = FPU_get_ldt_descriptor(addr->selector);
        base_address = SEG_BASE_ADDR(descriptor);
        address = base_address + offset;
        limit = base_address