jlaitine commented on code in PR #8026:
URL: https://github.com/apache/nuttx/pull/8026#discussion_r1061392888


##########
fs/mmap/fs_munmap.c:
##########
@@ -158,7 +159,44 @@ static int file_munmap_(FAR void *start, size_t length, 
bool kernel)
   nxmutex_unlock(&g_rammaps.lock);
   return ret;
 #else
+
+#ifdef CONFIG_MM_MAP
+  FAR struct tcb_s *tcb = nxsched_self();
+  FAR struct task_group_s *group = tcb->group;
+  FAR struct mm_map_entry_s *map = NULL;
+  int ret = OK;
+
+  /* Iterate through all the mappings and call the underlying
+   * unmap for every mapping where "start" lies
+   * break loop on any errors.
+   *
+   * Get exclusive access to mm_map for this
+   */
+
+  mm_map_lock(group);

Review Comment:
   I'll ad a check on lock return value here still



-- 
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-unsubscr...@nuttx.apache.org

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

Reply via email to