Commit 98b6474
iommu/arm-smmu-v3: Avoid open coded arithmetic in memory allocation
kmalloc_array()/kcalloc() should be used to avoid potential overflow when
a multiplication is needed to compute the size of the requested memory.
So turn a devm_kzalloc()+explicit size computation into an equivalent
devm_kcalloc().
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/3f7b9b202c6b6f5edc234ab7af5f208fbf8bc944.1644274051.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Will Deacon <will@kernel.org>1 parent 26291c5 commit 98b6474
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2981 | 2981 | | |
2982 | 2982 | | |
2983 | 2983 | | |
2984 | | - | |
2985 | 2984 | | |
2986 | 2985 | | |
2987 | | - | |
| 2986 | + | |
| 2987 | + | |
2988 | 2988 | | |
2989 | 2989 | | |
2990 | 2990 | | |
| |||
0 commit comments