Skip to content

Commit

Permalink
x86/ldt: Further fix FPU emulation
Browse files Browse the repository at this point in the history
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: 4809146 ("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>
  • Loading branch information
amluto authored and torvalds committed Aug 16, 2015
1 parent 4809146 commit 12e244f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/math-emu/get_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12e244f

Please sign in to comment.