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

[Xen-changelog] [xen master] vpci/msix: fix incorrect usage of bitmask

commit 9f5b0ce10b2895b4136c9e5c5ebd0aebac31ea98
Author:     Roger Pau Monné <roger.pau@xxxxxxxxxx>
AuthorDate: Mon Mar 26 15:17:12 2018 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Mar 26 15:17:12 2018 +0200

    vpci/msix: fix incorrect usage of bitmask
    The bitmask to clear the low bits of the address field should be
    ~0xffffffffull, the current mask clears both the low and the high bits
    of the address field, which is a bug.
    Reported-by: Coverity
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
 xen/drivers/vpci/msix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c
index 3b378c2e51..bcf63256f6 100644
--- a/xen/drivers/vpci/msix.c
+++ b/xen/drivers/vpci/msix.c
@@ -328,7 +328,7 @@ static int msix_write(struct vcpu *v, unsigned long addr, 
unsigned int len,
             entry->addr = data;
-        entry->addr &= ~0xffffffff;
+        entry->addr &= ~0xffffffffull;
         entry->addr |= data;
generated by git-patchbot for /home/xen/git/xen.git#master

Xen-changelog mailing list



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