]> xenbits.xensource.com Git - xen.git/commit
x86/shadow: fix ref-counting error handling
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Dec 2017 13:29:45 +0000 (14:29 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Dec 2017 13:29:45 +0000 (14:29 +0100)
commit10be8001de7d87be1f0ccdda75cc70e922e56d03
treef4dcb42985bf08bb2030ef54dd7209cd26c8d989
parent54e2292e8df7a1a7b041192be9d6d797b6d00869
x86/shadow: fix ref-counting error handling

The old-Linux handling in shadow_set_l4e() mistakenly ORed together the
results of sh_get_ref() and sh_pin(). As the latter failing is not a
correctness problem, simply ignore its return value.

In sh_set_toplevel_shadow() a failing sh_get_ref() must not be
accompanied by installing the entry, despite the domain being crashed.

This is XSA-250.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/shadow/multi.c