Skip to contentSkip to conversation

x86/p2m: fix mismatched unlock

PATCH In review Jan Beulich 4 participants 4 messages Sep 14, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/p2m: fix mismatched unlock

Luckily, due to gfn_unlock() currently mapping to p2m_unlock(), this is only a cosmetic issue right now.

---
Despite its cosmetic nature I think it would be better to also fix this in 4.6.

xen/arch/x86/mm/p2m.c +1 -1
@@ -912,7 +912,7 @@ static int set_typed_p2m_entry(struct do
     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;
     }

x86/p2m: fix mismatched unlock

Luckily, due to gfn_unlock() currently mapping to p2m_unlock(), this is only a cosmetic issue right now.

---
Despite its cosmetic nature I think it would be better to also fix this in 4.6.

xen/arch/x86/mm/p2m.c +1 -1
@@ -912,7 +912,7 @@ static int set_typed_p2m_entry(struct do
     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;
     }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

Luckily, due to gfn_unlock() currently mapping to p2m_unlock(), this is only a cosmetic issue right now.

Quoted 3 lines

---
Despite its cosmetic nature I think it would be better to also fix this in 4.6.

Quoted 37 lines
xen/arch/x86/mm/p2m.c +1 -1
@@ -912,7 +912,7 @@ static int set_typed_p2m_entry(struct do
     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;
     }

x86/p2m: fix mismatched unlock

Luckily, due to gfn_unlock() currently mapping to p2m_unlock(), this is only a cosmetic issue right now.

---
Despite its cosmetic nature I think it would be better to also fix this in 4.6.

xen/arch/x86/mm/p2m.c +1 -1
@@ -912,7 +912,7 @@ static int set_typed_p2m_entry(struct do
     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;
     }