x86/p2m: fix mismatched unlock
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Sep 2015 11:39:19 +0000 (13:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Sep 2015 11:39:19 +0000 (13:39 +0200)
Luckily, due to gfn_unlock() currently mapping to p2m_unlock(), this is
only a cosmetic issue right now.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
xen/arch/x86/mm/p2m.c

index c4329d2afb731aac008f0a3ac6c96c96e81c3eb5..e1d930a0af513365ac3f3bb7cb4b6f16fd6b165c 100644 (file)
@@ -913,7 +913,7 @@ static int set_typed_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn,
     omfn = p2m->get_entry(p2m, gfn, &ot, &a, 0, NULL, NULL);
     if ( p2m_is_grant(ot) || p2m_is_foreign(ot) )
     {
-        p2m_unlock(p2m);
+        gfn_unlock(p2m, gfn, 0);
         domain_crash(d);
         return -ENOENT;
     }