projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cbc61a
)
iommu/dma: Use kvcalloc() instead of kvzalloc()
author
Gustavo A. R. Silva
<gustavoars@kernel.org>
Tue, 28 Sep 2021 22:22:29 +0000
(17:22 -0500)
committer
Joerg Roedel
<jroedel@suse.de>
Wed, 27 Oct 2021 08:05:04 +0000
(10:05 +0200)
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>
drivers/iommu/dma-iommu.c
patch
|
blob
|
history
diff --git
a/drivers/iommu/dma-iommu.c
b/drivers/iommu/dma-iommu.c
index
3423597
..
fffa872
100644
(file)
--- 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 = kv
zalloc(count *
sizeof(*pages), GFP_KERNEL);
+ pages = kv
calloc(count,
sizeof(*pages), GFP_KERNEL);
if (!pages)
return NULL;