--- x/mm/z3fold.c +++ y/mm/z3fold.c @@ -1351,8 +1351,11 @@ static void z3fold_page_putback(struct p pool = zhdr_to_pool(zhdr); z3fold_page_lock(zhdr); - if (!list_empty(&zhdr->buddy)) + if (!list_empty(&zhdr->buddy)) { + spin_lock(&pool->lock); list_del_init(&zhdr->buddy); + spin_unlock(&pool->lock); + } INIT_LIST_HEAD(&page->lru); if (put_z3fold_locked(zhdr)) return;