# HG changeset patch # User Paul Boddie # Date 1679300602 -3600 # Node ID dc1441cbcb93883a238bea8be0c40576db8f64e4 # Parent 2707dae2e91c4d66c31ece7cae387876b8af2f94 Reordered pager capability freeing to avoid warnings about invalid pagers. diff -r 2707dae2e91c -r dc1441cbcb93 libexec/lib/src/external_pager.cc --- a/libexec/lib/src/external_pager.cc Sun Mar 19 19:38:07 2023 +0100 +++ b/libexec/lib/src/external_pager.cc Mon Mar 20 09:23:22 2023 +0100 @@ -299,11 +299,6 @@ else if (l4_is_valid_cap(_task)) { - /* Parent and pager/region mapper. */ - - ipc_unmap_capability(_task, _mapped_parent); - ipc_unmap_capability(_task, _mapped_pager); - /* Threads. For some reason, these cannot be released by the process, so they are also unmapped on its behalf. */ @@ -314,6 +309,12 @@ for (it = _mapped_threads.begin(); it != _mapped_threads.end(); it++) ipc_unmap_capability(_task, *it); + + /* Parent and pager/region mapper. Freeing these after the threads should + avoid warnings about invalid pager capabilities. */ + + ipc_unmap_capability(_task, _mapped_parent); + ipc_unmap_capability(_task, _mapped_pager); } }