From e89c9b128bc0832a0cdb71c58daed8a09886f36e Mon Sep 17 00:00:00 2001 From: neal Date: Mon, 23 Jun 2008 11:44:02 +0000 Subject: 2008-06-23 Neal H. Walfield * pager.c (pager_deinit): Drop PAGER->LOCK before calling MAP_DESTROY. --- libhurd-mm/ChangeLog | 5 +++++ libhurd-mm/pager.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'libhurd-mm') 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 + + * pager.c (pager_deinit): Drop PAGER->LOCK before calling + MAP_DESTROY. + 2008-06-22 Neal H. Walfield * 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); } } -- cgit v1.2.3