--- mm/mmu_notifier.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) Index: linux-2.6/mm/mmu_notifier.c =================================================================== --- linux-2.6.orig/mm/mmu_notifier.c 2008-01-30 11:21:57.000000000 -0800 +++ linux-2.6/mm/mmu_notifier.c 2008-01-30 11:24:59.000000000 -0800 @@ -9,8 +9,9 @@ * the COPYING file in the top-level directory. */ -#include #include +#include +#include void mmu_notifier_release(struct mm_struct *mm) { @@ -18,6 +19,7 @@ void mmu_notifier_release(struct mm_stru struct hlist_node *n, *t; if (unlikely(!hlist_empty(&mm->mmu_notifier.head))) { + down_write(&mm->mmap_sem); rcu_read_lock(); hlist_for_each_entry_safe_rcu(mn, n, t, &mm->mmu_notifier.head, hlist) { @@ -26,6 +28,7 @@ void mmu_notifier_release(struct mm_stru mn->ops->release(mn, mm); } rcu_read_unlock(); + up_write(&mm->mmap_sem); synchronize_rcu(); } } @@ -80,6 +83,7 @@ void mmu_notifier_unregister(struct mmu_ } EXPORT_SYMBOL_GPL(mmu_notifier_unregister); +#ifdef CONFIG_64BIT static DEFINE_SPINLOCK(mmu_notifier_list_lock); HLIST_HEAD(mmu_rmap_notifier_list); @@ -111,3 +115,5 @@ void mmu_rmap_export_page(struct page *p SetPageExternalRmap(page); } EXPORT_SYMBOL(mmu_rmap_export_page); + +#endif