Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70efc4bd authored by Kyle Yan's avatar Kyle Yan Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: slub: call kasan_alloc_pages before freeing pages in slub" into msm-4.9

parents 9d9d23fa af343627
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1673,6 +1673,7 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
	if (current->reclaim_state)
		current->reclaim_state->reclaimed_slab += pages;
	memcg_uncharge_slab(page, order, s);
	kasan_alloc_pages(page, order);
	__free_pages(page, order);
}

@@ -3881,6 +3882,7 @@ void kfree(const void *x)
	if (unlikely(!PageSlab(page))) {
		BUG_ON(!PageCompound(page));
		kfree_hook(x);
		kasan_alloc_pages(page, compound_order(page));
		__free_pages(page, compound_order(page));
		return;
	}