Lines Matching refs:new_ldt
39 struct ldt_struct *new_ldt; in alloc_ldt_struct() local
45 new_ldt = kmalloc(sizeof(struct ldt_struct), GFP_KERNEL); in alloc_ldt_struct()
46 if (!new_ldt) in alloc_ldt_struct()
59 new_ldt->entries = vzalloc(alloc_size); in alloc_ldt_struct()
61 new_ldt->entries = kzalloc(PAGE_SIZE, GFP_KERNEL); in alloc_ldt_struct()
63 if (!new_ldt->entries) { in alloc_ldt_struct()
64 kfree(new_ldt); in alloc_ldt_struct()
68 new_ldt->size = size; in alloc_ldt_struct()
69 return new_ldt; in alloc_ldt_struct()
108 struct ldt_struct *new_ldt; in init_new_context() local
125 new_ldt = alloc_ldt_struct(old_mm->context.ldt->size); in init_new_context()
126 if (!new_ldt) { in init_new_context()
131 memcpy(new_ldt->entries, old_mm->context.ldt->entries, in init_new_context()
132 new_ldt->size * LDT_ENTRY_SIZE); in init_new_context()
133 finalize_ldt_struct(new_ldt); in init_new_context()
135 mm->context.ldt = new_ldt; in init_new_context()
214 struct ldt_struct *new_ldt, *old_ldt; in write_ldt() local
255 new_ldt = alloc_ldt_struct(newsize); in write_ldt()
256 if (!new_ldt) in write_ldt()
260 memcpy(new_ldt->entries, old_ldt->entries, oldsize * LDT_ENTRY_SIZE); in write_ldt()
261 new_ldt->entries[ldt_info.entry_number] = ldt; in write_ldt()
262 finalize_ldt_struct(new_ldt); in write_ldt()
264 install_ldt(mm, new_ldt); in write_ldt()