lkml.org 
[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/23] x86, kaiser: map dynamically-allocated LDTs
> diff -puN arch/x86/kernel/ldt.c~kaiser-user-map-new-ldts arch/x86/kernel/ldt.c
> --- a/arch/x86/kernel/ldt.c~kaiser-user-map-new-ldts 2017-11-22 15:45:49.059619739 -0800
> +++ b/arch/x86/kernel/ldt.c 2017-11-22 15:45:49.062619739 -0800
> @@ -11,6 +11,7 @@
[...]
> + ret = kaiser_add_mapping((unsigned long)new_ldt->entries, alloc_size,
> + __PAGE_KERNEL | _PAGE_GLOBAL);
> + if (ret) {
> + __free_ldt_struct(new_ldt);
> + return NULL;
> + }
> new_ldt->nr_entries = num_entries;
> return new_ldt;

__free_ldt_struct() uses new_ldt->nr_entries, so new_ldt->nr_entries needs to be
set earlier.

Eric

\
 
 \ /
  Last update: 2017-11-23 20:43    [W:0.189 / U:1.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site