]> xenbits.xensource.com Git - xen.git/commit
x86/mm: Prevent leaking domain mappings in paging_log_dirty_op()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 13 Jan 2014 14:59:28 +0000 (15:59 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Jan 2014 14:59:28 +0000 (15:59 +0100)
commitbbe395ebb8131c5ceee08308870a8aeab259dc8f
tree8e8177cfc3bfec10c7c8893664c031796520e6f1
parentfe046454eb9e44e99706bc2b42058aa0a9e2631b
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>
master commit: 0725f326358cbb2ba7f9626976e346b963d74c37
master date: 2013-12-17 16:38:07 +0100
xen/arch/x86/mm/paging.c