From: Andrew Cooper Subject: [PATCH] VT-d: Correct order of parameters to memset() in setup_posted_irte() Date: Thu, 10 Dec 2015 16:07:28 +0000 Message-ID: <1449763648-27271-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Kevin Tian , Feng Wu , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 --- CC: Jan Beulich CC: Feng Wu CC: Kevin Tian --- xen/drivers/passthrough/vtd/intremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/vtd/intremap.c index 0a48cd4..0ee3fb2 100644 --- a/xen/drivers/passthrough/vtd/intremap.c +++ b/xen/drivers/passthrough/vtd/intremap.c @@ -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) -- 2.1.4