You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/04/13 04:06:16 UTC

[incubator-nuttx] branch master updated: mm: mm_heap: Fix deadlock in mm_trysemaphore in SMP mode

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 12ff221  mm: mm_heap: Fix deadlock in mm_trysemaphore in SMP mode
12ff221 is described below

commit 12ff2212f56ec9698043455c436d3259e55f80e6
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Apr 13 11:46:27 2020 +0900

    mm: mm_heap: Fix deadlock in mm_trysemaphore in SMP mode
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 mm/mm_heap/mm_sem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/mm_heap/mm_sem.c b/mm/mm_heap/mm_sem.c
index abe41e2..94e6665 100644
--- a/mm/mm_heap/mm_sem.c
+++ b/mm/mm_heap/mm_sem.c
@@ -179,7 +179,8 @@ int mm_trysemaphore(FAR struct mm_heap_s *heap)
 
   if (my_pid < 0)
     {
-      return my_pid;
+      ret = my_pid;
+      goto errout;
     }
 
   /* Does the current task already hold the semaphore?  Is the current