]> git.baikalelectronics.ru Git - kernel.git/commit
xen/p2m: Don't call get_balloon_scratch_page() twice, keep interrupts disabled for...
authorBoris Ostrovsky <boris.ostrovsky@oracle.com>
Mon, 9 Sep 2013 10:44:26 +0000 (10:44 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Mon, 9 Sep 2013 10:50:52 +0000 (10:50 +0000)
commitece9c4882405a90b7c2c6f296edb3461410ecc01
tree712a6bf69b28b03a0defce46f7289d4cfba94eb0
parent105794fb0110ef1883b0030a58b0778780abe722
xen/p2m: Don't call get_balloon_scratch_page() twice, keep interrupts disabled for multicalls

m2p_remove_override() calls get_balloon_scratch_page() in
MULTI_update_va_mapping() even though it already has pointer to this page from
the earlier call (in scratch_page). This second call doesn't have a matching
put_balloon_scratch_page() thus not restoring preempt count back. (Also, there
is no put_balloon_scratch_page() in the error path.)

In addition, the second multicall uses __xen_mc_entry() which does not disable
interrupts. Rearrange xen_mc_* calls to keep interrupts off while performing
multicalls.

This commit fixes a regression introduced by:

commit d6db0a938d0c8bf873d29c961039284295df562e
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Tue Jul 23 17:23:54 2013 +0000

    xen/m2p: use GNTTABOP_unmap_and_replace to reinstate the original mapping

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
arch/x86/xen/p2m.c