[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen stable-4.13] x86/shadow: correct an inverted conditional in dirty VRAM tracking



commit 7a76deb101c8e3d7f6667448f1620957405c0930
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Jul 7 15:00:37 2020 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jul 7 15:00:37 2020 +0200

    x86/shadow: correct an inverted conditional in dirty VRAM tracking
    
    This originally was "mfn_x(mfn) == INVALID_MFN". Make it like this
    again, taking the opportunity to also drop the unnecessary nearby
    braces.
    
    This is XSA-319.
    
    Fixes: 246a5a3377c2 ("xen: Use a typesafe to define INVALID_MFN")
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    master commit: 23a216f99d40fbfbc2318ade89d8213eea6ba1f8
    master date: 2020-07-07 14:36:24 +0200
---
 xen/arch/x86/mm/shadow/common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 314d837602..dd8d9240ea 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -3249,10 +3249,8 @@ int shadow_track_dirty_vram(struct domain *d,
             int dirty = 0;
             paddr_t sl1ma = dirty_vram->sl1ma[i];
 
-            if ( !mfn_eq(mfn, INVALID_MFN) )
-            {
+            if ( mfn_eq(mfn, INVALID_MFN) )
                 dirty = 1;
-            }
             else
             {
                 page = mfn_to_page(mfn);
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.13



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.