]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ldt: Fix support_pte_mask filtering in map_ldt_struct()
authorJoerg Roedel <jroedel@suse.de>
Mon, 16 Apr 2018 09:43:57 +0000 (11:43 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 16 Apr 2018 18:20:34 +0000 (11:20 -0700)
commit61e69ea2ab8dc14dca1b168cd040b835ff221cd7
tree6df2d211a3e49359466e8b0dd3183a5d2d285495
parentfedbd783dfdfa040524ea8eb8a31cb2a775a133b
x86/ldt: Fix support_pte_mask filtering in map_ldt_struct()

The |= operator will let us end up with an invalid PTE. Use
the correct &= instead.

[ The bug was also independently reported by Shuah Khan ]

Fixes: 3a5484af8fcc ('x86/mm: Do not auto-massage page protections')
Acked-by: Andy Lutomirski <luto@kernel.org>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/ldt.c