提交 37a40710 编写于 作者: H Hannes Reinecke 提交者: Joerg Roedel

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: NHannes Reinecke <hare@suse.de>
Signed-off-by: NJoerg Roedel <joro@8bytes.org>
上级 88b62b91
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册