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

[incubator-nuttx] branch releases/9.0 updated: mm: Fix heap corruption in protected build

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

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


The following commit(s) were added to refs/heads/releases/9.0 by this push:
     new 4401e5b  mm: Fix heap corruption in protected build
4401e5b is described below

commit 4401e5b280b80eef5145a130b70a5abd2dd3860b
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Wed Apr 22 08:40:05 2020 +0900

    mm: Fix heap corruption in protected build
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 include/nuttx/mm/mm.h      | 4 ----
 mm/mm_heap/mm_initialize.c | 2 --
 2 files changed, 6 deletions(-)

diff --git a/include/nuttx/mm/mm.h b/include/nuttx/mm/mm.h
index 4536200..f448138 100644
--- a/include/nuttx/mm/mm.h
+++ b/include/nuttx/mm/mm.h
@@ -211,12 +211,10 @@ struct mm_freenode_s
   FAR struct mm_freenode_s *blink;
 };
 
-#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
 struct mm_delaynode_s
 {
   struct mm_delaynode_s *flink;
 };
-#endif
 
 /* What is the size of the freenode? */
 
@@ -258,11 +256,9 @@ struct mm_heap_s
 
   struct mm_freenode_s mm_nodelist[MM_NNODES];
 
-#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
   /* Free delay list, for some situation can't do free immdiately */
 
   struct mm_delaynode_s *mm_delaylist;
-#endif
 };
 
 /****************************************************************************
diff --git a/mm/mm_heap/mm_initialize.c b/mm/mm_heap/mm_initialize.c
index d96b7b1..fa41069 100644
--- a/mm/mm_heap/mm_initialize.c
+++ b/mm/mm_heap/mm_initialize.c
@@ -175,11 +175,9 @@ void mm_initialize(FAR struct mm_heap_s *heap, FAR void *heapstart,
   heap->mm_nregions = 0;
 #endif
 
-#if defined(CONFIG_BUILD_FLAT) || defined(__KERNEL__)
   /* Initialize mm_delaylist */
 
   heap->mm_delaylist = NULL;
-#endif
 
   /* Initialize the node array */