iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmar: Zero out memory
@ 2013-02-06  8:50 Hannes Reinecke
       [not found] ` <1360140610-48309-1-git-send-email-hare-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2013-02-06  8:50 UTC (permalink / raw)
  To: iommu; +Cc: linux-kernel, Hannes Reinecke, David Woodhouse

kmemcheck complained about the use of uninitialized memory.
So there.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 86e2f4a..2623a57 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1040,7 +1040,7 @@ int dmar_enable_qi(struct intel_iommu *iommu)
 
 	qi->desc = page_address(desc_page);
 
-	qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
+	qi->desc_status = kzalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
 	if (!qi->desc_status) {
 		free_page((unsigned long) qi->desc);
 		kfree(qi);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmar: Zero out memory
       [not found] ` <1360140610-48309-1-git-send-email-hare-l3A5Bk7waGM@public.gmane.org>
@ 2013-02-07 21:02   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2013-02-07 21:02 UTC (permalink / raw)
  To: Hannes Reinecke
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	David Woodhouse, linux-kernel-u79uwXL29TY76Z2rM5mHXA

On Wed, Feb 06, 2013 at 09:50:10AM +0100, Hannes Reinecke wrote:
> kmemcheck complained about the use of uninitialized memory.
> So there.
> 
> Cc: David Woodhouse <dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
> Signed-off-by: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>

Applied to x86/vt-d, thanks Hannes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-07 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-06  8:50 [PATCH] dmar: Zero out memory Hannes Reinecke
     [not found] ` <1360140610-48309-1-git-send-email-hare-l3A5Bk7waGM@public.gmane.org>
2013-02-07 21:02   ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).