]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kaiser: fix unlikely error in alloc_ldt_struct()
authorHugh Dickins <hughd@google.com>
Tue, 5 Dec 2017 04:13:35 +0000 (20:13 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:20:08 +0000 (10:20 -0800)
commitcc8fb8855add6a5c536b312c9e6ce70b68d69969
tree0a9256f1f30d56e154871829cae6ab74f613dc46
parentfc5b4ecc109e161460f65cca4ec1ed5c2539c1ce
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>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 500943e57db8d3e298e98f595f835c5b613e843b)
Orabug: 27333760
CVE: CVE-2017-5754
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/kernel/ldt.c