]> xenbits.xensource.com Git - xen.git/commit
x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 17 Dec 2013 15:38:07 +0000 (16:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Dec 2013 15:38:07 +0000 (16:38 +0100)
commit0725f326358cbb2ba7f9626976e346b963d74c37
tree1c7c93ceb935932c3cb51a67d93d3e0e14461ba2
parent5816c3e4dcb92fb444e7b8eb2004a1fb357ea733
x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()

Coverity ID: 1135374 1135375 1135376 1135377

If {copy_to,clear}_guest_offset() fails, we would leak the domain mappings for
l4 thru l1.

Fixing this requires having conditional unmaps on the faulting path, which in
turn requires explicitly initialising the pointers to NULL because of the
early ENOMEM exit.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm/paging.c