mmap_frag() users only check for -1 error
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
a0f291fc10
commit
ee636500d6
@ -243,7 +243,7 @@ static int mmap_frag(abi_ulong real_start,
|
|||||||
possible while it is a shared mapping */
|
possible while it is a shared mapping */
|
||||||
if ((flags & MAP_TYPE) == MAP_SHARED &&
|
if ((flags & MAP_TYPE) == MAP_SHARED &&
|
||||||
(prot & PROT_WRITE))
|
(prot & PROT_WRITE))
|
||||||
return -EINVAL;
|
return -1;
|
||||||
|
|
||||||
/* adjust protection to be able to read */
|
/* adjust protection to be able to read */
|
||||||
if (!(prot1 & PROT_WRITE))
|
if (!(prot1 & PROT_WRITE))
|
||||||
|
Loading…
Reference in New Issue
Block a user