]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
VT-d: Correct order of parameters to memset() in setup_posted_irte()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 10 Dec 2015 16:25:18 +0000 (17:25 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 10 Dec 2015 16:25:18 +0000 (17:25 +0100)
Introduced in c/s 83ea9229 "vt-d: add API to update IRTE when VT-d PI is
used".  Spotted by Coverity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/drivers/passthrough/vtd/intremap.c

index 0a48cd429ce8109e11c3ae0b33d6174560bc805a..0ee3fb2d0fe96a60b144766deb4279cd475c623f 100644 (file)
@@ -910,7 +910,7 @@ static void setup_posted_irte(
     struct iremap_entry *new_ire, const struct iremap_entry *old_ire,
     const struct pi_desc *pi_desc, const uint8_t gvec)
 {
-    memset(new_ire, sizeof(*new_ire), 0);
+    memset(new_ire, 0, sizeof(*new_ire));
 
     /*
      * 'im' filed decides whether the irte is in posted format (with value 1)