VT-d: Correct order of parameters to memset() in setup_posted_irte()
PATCH 1/1 VT-d: Correct order of parameters to memset() in setup_posted_irte()
Introduced in c/s 83ea9229 "vt-d: add API to update IRTE when VT-d PI is used". Spotted by Coverity.
---
CC: Jan Beulich <[email protected]>
CC: Feng Wu <[email protected]>
CC: Kevin Tian <[email protected]>
--- xen/drivers/passthrough/vtd/intremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/vtd/intremap.c +1 -1
@@ -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)
Signature · 1 line
2.1.4
Quoted 30 lines
-----Original Message-----
From: Andrew Cooper [mailto:[email protected]]
Sent: Friday, December 11, 2015 12:07 AM
To: Xen-devel <[email protected]>
Cc: Andrew Cooper <[email protected]>; Jan Beulich <[email protected]>; Wu, Feng <[email protected]>; Tian, Kevin <[email protected]>
Subject: [PATCH] VT-d: Correct order of parameters tomemset()insetup_posted_irte()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 <[email protected]>---
CC: Jan Beulich <[email protected]>
CC: Feng Wu <[email protected]>
CC: Kevin Tian <[email protected]>--- xen/drivers/passthrough/vtd/intremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/drivers/passthrough/vtd/intremap.c +0
-0
xen/drivers/passthrough/vtd/intremap.c static void setup_posted_irte( · line 913
Quoted 5 lines
xen/drivers/passthrough/vtd/intremap.c +1
-1@@ -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));
Thanks for the fix.
Thanks,
Feng
Quoted 5 lines
xen/drivers/passthrough/vtd/intremap.c +0
-1/* * 'im' filed decides whether the irte is in posted format (with value 1) -- 2.1.4