linux-user: mprotect() should returns 0 when len is 0.
PATCH 1/1 linux-user: mprotect() should returns 0 when len is 0.
From: sisshiki1969 <[email protected]>
Signed-off-by sisshiki1969 <[email protected]>
--- linux-user/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
linux-user/mmap.c +3 -3
@@ -130,12 +130,12 @@ int target_mprotect(abi_ulong start, abi_ulong len, int target_prot) } len =TARGET_PAGE_ALIGN (len); end = start + len; -if (!guest_range_valid_untagged (start, len)) { -return -TARGET_ENOMEM ; - }if (len ==0 ) {return 0 ; } +if (!guest_range_valid_untagged (start, len)) { +return -TARGET_ENOMEM ; + }mmap_lock (); host_start = start & qemu_host_page_mask;
Signature · 1 line
2.25.1