kaiser: fix unlikely error in alloc_ldt_struct()
authorHugh Dickins <hughd@google.com>
Tue, 5 Dec 2017 04:13:35 +0000 (20:13 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Jan 2018 14:46:34 +0000 (15:46 +0100)
commitcb7d8d7e6737cad77d5eaba9f9c95f3322706198
treec722799e5beb472956cc115873dc350029cd4a09
parent3df146178706bf39cfcb22d7fe1a378af6dc5896
kaiser: fix unlikely error in alloc_ldt_struct()

An error from kaiser_add_mapping() here is not at all likely, but
Eric Biggers rightly points out that __free_ldt_struct() relies on
new_ldt->size being initialized: move that up.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/ldt.c