On 10/24/24 12:46, Ilias Apalodimas wrote:
We never unmap the memory used to update the EFI memory map after
notifications

Fixes: commit 2f6191526a13 ("lmb: notify of any changes to the LMB memory map")
Signed-off-by: Ilias Apalodimas <ilias.apalodi...@linaro.org>
---
  lib/lmb.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/lib/lmb.c b/lib/lmb.c
index 890e2cbfdf6b..38c6e1d5ba8d 100644
--- a/lib/lmb.c
+++ b/lib/lmb.c
@@ -65,6 +65,7 @@ static int __maybe_unused lmb_map_update_notify(phys_addr_t 
addr,
                        status & ~EFI_ERROR_MASK);
                return -1;
        }
+       unmap_sysmem((void *)(uintptr_t)efi_addr);

If PCI memory was ever mapped via pci_map_physmem(), I don't think that
we want to unmap it here.

Why do we map the memory in this notification function first hand? Can't
we use len = 0 when calling map_sysmem()?

I guess we have to critically review all map_sysmem() calls.

Best regards

Heinrich


        return 0;
  }

Reply via email to