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/nuttx.git

commit c57c11c516ef9c697ef39f474f0278094e1b9311
Author: Ville Juven <ville.ju...@unikie.com>
AuthorDate: Fri Sep 29 12:31:33 2023 +0300

    mm/kmap: Fix bug in kmm_unmap
    
    Searching the current process mappings for kmappings is quite futile,
    do the search in the kernel's mappings instead.
---
 mm/kmap/kmm_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/kmap/kmm_map.c b/mm/kmap/kmm_map.c
index 85d435d485..1312e6af0e 100644
--- a/mm/kmap/kmm_map.c
+++ b/mm/kmap/kmm_map.c
@@ -308,7 +308,7 @@ void kmm_unmap(FAR void *kaddr)
     {
       /* Find the entry, it is OK if none found */
 
-      entry = mm_map_find(get_current_mm(), kaddr, 1);
+      entry = mm_map_find(&g_kmm_map, kaddr, 1);
       if (entry)
         {
           npages = MM_NPAGES(entry->length);

Reply via email to