diff options
Diffstat (limited to 'libhurd-mm/anonymous.c')
-rw-r--r-- | libhurd-mm/anonymous.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libhurd-mm/anonymous.c b/libhurd-mm/anonymous.c index 2185613..4461360 100644 --- a/libhurd-mm/anonymous.c +++ b/libhurd-mm/anonymous.c @@ -292,6 +292,8 @@ fault (struct pager *pager, uintptr_t offset, int count, bool read_only, } } + ss_mutex_unlock (&anon->lock); + r = true; if (anon->fill) @@ -328,8 +330,6 @@ fault (struct pager *pager, uintptr_t offset, int count, bool read_only, } } - ss_mutex_unlock (&anon->lock); - profile_region_end (); debug (5, "Fault at %x resolved", fault_addr); @@ -436,6 +436,9 @@ destroy (struct pager *pager) struct anonymous_pager *anon = (struct anonymous_pager *) pager; + /* Wait any fill function returns. */ + ss_mutex_lock (&anon->fill_lock); + if (anon->staging_area) /* Free the staging area. */ { |