In function obj_malloc: if (!class->huge) /* record handle in the header of allocated chunk */ link->handle = handle; else /* record handle in first_page->private */ set_page_private(first_page, handle); The huge's page save handle to private directly. But in obj_to_head: if (class->huge) { VM_BUG_ON(!is_first_page(page)); return page_private(page); } else return *(unsigned long *)obj; It is used as a pointer. So change obj_to_head use page_private(page) as value but not pointer in obj_to_head. Signed-off-by: Hui Zhu <zhuhui@xxxxxxxxxx> --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index f135b1b..e881d4f 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -824,7 +824,7 @@ static unsigned long obj_to_head(struct size_class *class, struct page *page, { if (class->huge) { VM_BUG_ON(!is_first_page(page)); - return *(unsigned long *)page_private(page); + return page_private(page); } else return *(unsigned long *)obj; } -- 1.9.1 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>