From: Roger Pau Monné Date: Mon, 26 Mar 2018 13:17:12 +0000 (+0200) Subject: vpci/msix: fix incorrect usage of bitmask X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=9f5b0ce10b2895b4136c9e5c5ebd0aebac31ea98;p=people%2Fiwj%2Fxen.git 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é Reviewed-by: Jan Beulich --- 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; break; } - entry->addr &= ~0xffffffff; + entry->addr &= ~0xffffffffull; entry->addr |= data; break;