arch_get_unmapped_area() could potentially allow a larger than possible
length when using the MAP_FIXED flag. The bound check should come
before the check for MAP_FIXED.
Fixes: 5bba49f5397c (ARC: [mm] Aliasing VIPT dcache support 4/4)
Signed-off-by: Liam R. Howlett
---
arch/arc/mm/mmap.c | 6 ++
RFC because the patches are not well tested. I've not triggered the
issue these patches fix, but have compile tested arm, sh, and sparc64
using the default config. Please test the patches before accepting them
on your arch.
arc, arm, nds32, sparc32 and sparc64 do not check the size of the
reques