diff --git a/mm/ksm.c b/mm/ksm.c index d6c81a5076a7..27ff68050d85 100644 --- a/mm/ksm.c +++ b/mm/ksm.c @@ -629,6 +629,7 @@ static void remove_rmap_item_from_tree(struct rmap_item *rmap_item) ksm_pages_shared--; put_anon_vma(rmap_item->anon_vma); + rmap_item->head = NULL; rmap_item->address &= PAGE_MASK; } else if (rmap_item->address & UNSTABLE_FLAG) {