You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/06/30 09:31:20 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #3985: mmap: Implement the minial but reasonable mlock/munlock/mprotect

xiaoxiang781216 commented on a change in pull request #3985:
URL: https://github.com/apache/incubator-nuttx/pull/3985#discussion_r661291462



##########
File path: fs/mmap/fs_mmap.c
##########
@@ -132,8 +132,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags,
    * logic is not in place.
    */
 
-  if (prot == PROT_NONE ||
-      (flags & (MAP_FIXED | MAP_DENYWRITE)) != 0)
+  if ((flags & (MAP_FIXED | MAP_DENYWRITE)) != 0)

Review comment:
       Since the caller may set PROT_NONE initially and then change to PROT_WRITE/PROT_READ... by mprotect later.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org