Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 37a40710 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Joerg Roedel
Browse files

iommu/vt-d: Zero out allocated memory in dmar_enable_qi



kmemcheck complained about the use of uninitialized memory.
Fix by using kzalloc instead of kmalloc.

Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
parent 88b62b91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);