summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorGustavo A. R. Silva <gustavoars@kernel.org>2021-09-29 00:22:29 +0200
committerJoerg Roedel <jroedel@suse.de>2021-10-27 10:05:04 +0200
commitab6f4b001c8c726b5e0bb01429710dc61f13e24d (patch)
tree9da9d8283d852f448f3126dbee0a3e44f0d29184 /drivers/iommu
parentiommu/dma: Account for min_align_mask w/swiotlb (diff)
downloadlinux-ab6f4b001c8c726b5e0bb01429710dc61f13e24d.tar.xz
linux-ab6f4b001c8c726b5e0bb01429710dc61f13e24d.zip
iommu/dma: Use kvcalloc() instead of kvzalloc()
Use 2-factor argument form kvcalloc() instead of kvzalloc(). Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Robin Murphy <robin.murphy@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20210928222229.GA280355@embeddedor Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/dma-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 342359727a59..fffa8721a8f0 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -558,7 +558,7 @@ static struct page **__iommu_dma_alloc_pages(struct device *dev,
if (!order_mask)
return NULL;
- pages = kvzalloc(count * sizeof(*pages), GFP_KERNEL);
+ pages = kvcalloc(count, sizeof(*pages), GFP_KERNEL);
if (!pages)
return NULL;