From c03f7fe82cc62ebeb81851247897b36d5bbba61d Mon Sep 17 00:00:00 2001 From: Hugh Dickins Date: Sun, 17 Dec 2017 19:53:01 -0800 Subject: [PATCH] kaiser: alloc_ldt_struct() use get_zeroed_page() Change the 3.2.96 and 3.18.72 alloc_ldt_struct() to allocate its entries with get_zeroed_page(), as 4.3 onwards does since f454b4788613 ("x86/ldt: Fix small LDT allocation for Xen"). This then matches the free_page() I had misported in __free_ldt_struct(), and fixes the "BUG: Bad page state in process ldt_gdt_32 ... flags: 0x80(slab)" reported by Kees Cook and Jiri Kosina, and analysed by Jiri. Signed-off-by: Hugh Dickins Signed-off-by: Ben Hutchings --- Reading git-format-patch failed