munlock() currently gets passed a range that is wider than the targeted mapping. This fails in PCuABI, as the bounds check against the passed capability will fail. Reduce len accordingly.
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- testcases/kernel/syscalls/munlock/munlock02.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/testcases/kernel/syscalls/munlock/munlock02.c b/testcases/kernel/syscalls/munlock/munlock02.c index f51c3d21f24a..ea095b59ce63 100644 --- a/testcases/kernel/syscalls/munlock/munlock02.c +++ b/testcases/kernel/syscalls/munlock/munlock02.c @@ -38,6 +38,7 @@ static void setup(void) * unmap part of the area, to create the condition for ENOMEM */ addr += 2 * pg_size; + len -= 2 * pg_size; SAFE_MUNMAP(addr, 4 * pg_size); }