]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commit
x86emul: also put_fpu() on error paths
authorJan Beulich <jbeulich@suse.com>
Mon, 18 May 2015 10:11:31 +0000 (12:11 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 18 May 2015 10:11:31 +0000 (12:11 +0200)
commit08c902a39f5f7aa0e1d5fe664b2b8db458d4fb73
tree3b9cb93c42bcba4f0bf28c5f98e45ff4a1ba2953
parente4ad2836842ac114e7791963d56ebd02dd4c384f
x86emul: also put_fpu() on error paths

fail_if() and generate_exception_if() could theoretically bypass the
normal flow reaching put_fpu(), and not invoking it would leave the
fpu_exception_callback pointer in place, allowing for the callback to
be called at an unexpected time. Luckily the two
generate_exception_if()-s that would actually trigger this are
currently commented out, so this is not (yet) a (security) issue.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c
xen/arch/x86/x86_emulate/x86_emulate.h