diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2017-04-21 09:41:40 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-04-21 09:41:39 -0700 |
| commit | d44796d6aeafe97d8e14da09d16bebcaf0aa0c5b (patch) | |
| tree | 4579a489b24697df6264afb4f55d754c92fb04af | |
| parent | f9da89f3cad4a79df8e571f592d2f71e295a5c26 (diff) | |
| parent | ae4040d39a9d444b35a63047ab3f2c946d874996 (diff) | |
Merge "arm: dma-mapping: add iova size alignment check"
| -rw-r--r-- | arch/arm/mm/dma-mapping.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 0efa67b299b6..a25d6b0e22a4 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -2169,6 +2169,9 @@ arm_iommu_create_mapping(struct bus_type *bus, dma_addr_t base, u64 size) if (!bitmap_size) return ERR_PTR(-EINVAL); + WARN(!IS_ALIGNED(size, SZ_128M), + "size is not aligned to 128M, alignment enforced"); + if (bitmap_size > PAGE_SIZE) { extensions = bitmap_size / PAGE_SIZE; bitmap_size = PAGE_SIZE; |
