summaryrefslogtreecommitdiff
path: root/libhurd-mm
diff options
context:
space:
mode:
authorneal <neal>2008-06-23 11:44:02 +0000
committerneal <neal>2008-06-23 11:44:02 +0000
commite89c9b128bc0832a0cdb71c58daed8a09886f36e (patch)
tree2ca55d9074a0a57deded8d366c0072ac254514b3 /libhurd-mm
parentca54ca0e1d4d2eee5b0d4a26809498ac6309144c (diff)
2008-06-23 Neal H. Walfield <neal@gnu.org>
* pager.c (pager_deinit): Drop PAGER->LOCK before calling MAP_DESTROY.
Diffstat (limited to 'libhurd-mm')
-rw-r--r--libhurd-mm/ChangeLog5
-rw-r--r--libhurd-mm/pager.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/libhurd-mm/ChangeLog b/libhurd-mm/ChangeLog
index 9764c49..e18d3de 100644
--- a/libhurd-mm/ChangeLog
+++ b/libhurd-mm/ChangeLog
@@ -1,3 +1,8 @@
+2008-06-23 Neal H. Walfield <neal@gnu.org>
+
+ * pager.c (pager_deinit): Drop PAGER->LOCK before calling
+ MAP_DESTROY.
+
2008-06-22 Neal H. Walfield <neal@gnu.org>
* mprotect.c (mprotect): Tweak debugging output.
diff --git a/libhurd-mm/pager.c b/libhurd-mm/pager.c
index 13f9923..5ac52b3 100644
--- a/libhurd-mm/pager.c
+++ b/libhurd-mm/pager.c
@@ -63,6 +63,7 @@ pager_deinit (struct pager *pager)
if (! map->map_list_next)
/* The last reference. */
{
+ ss_mutex_unlock (&pager->lock);
maps_lock_unlock ();
map_destroy (map);
@@ -70,8 +71,12 @@ pager_deinit (struct pager *pager)
return;
}
- /* This drops PAGER->LOCK. */
+ ss_mutex_unlock (&pager->lock);
+
+ /* It is safe to call with with MAPS_LOCK held as we know that
+ this is not the last refence. */
map_destroy (map);
+
ss_mutex_lock (&pager->lock);
}
}