aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/ldt.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/arch/x86/kernel/ldt.c b/arch/x86/kernel/ldt.c
index 18e4525c5933..6135ae8ce036 100644
--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -207,7 +207,6 @@ map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
207 bool is_vmalloc; 207 bool is_vmalloc;
208 spinlock_t *ptl; 208 spinlock_t *ptl;
209 int i, nr_pages; 209 int i, nr_pages;
210 pgd_t *pgd;
211 210
212 if (!static_cpu_has(X86_FEATURE_PTI)) 211 if (!static_cpu_has(X86_FEATURE_PTI))
213 return 0; 212 return 0;
@@ -221,13 +220,6 @@ map_ldt_struct(struct mm_struct *mm, struct ldt_struct *ldt, int slot)
221 /* Check if the current mappings are sane */ 220 /* Check if the current mappings are sane */
222 sanity_check_ldt_mapping(mm); 221 sanity_check_ldt_mapping(mm);
223 222
224 /*
225 * Did we already have the top level entry allocated? We can't
226 * use pgd_none() for this because it doens't do anything on
227 * 4-level page table kernels.
228 */
229 pgd = pgd_offset(mm, LDT_BASE_ADDR);
230
231 is_vmalloc = is_vmalloc_addr(ldt->entries); 223 is_vmalloc = is_vmalloc_addr(ldt->entries);
232 224
233 nr_pages = DIV_ROUND_UP(ldt->nr_entries * LDT_ENTRY_SIZE, PAGE_SIZE); 225 nr_pages = DIV_ROUND_UP(ldt->nr_entries * LDT_ENTRY_SIZE, PAGE_SIZE);