mm: fix wrong kasan report [1/1]
PD#SWPL-13281
Problem:
There are 2 types of wrong kasan report after merge change of
save wasted slab.
1, slab-out-of-bounds, which is caused by krealloc set shadow
memory out-of-range, since tail of page was freed.
2, use-after-free, which is caused by kasan_free_pages called
after a page freed. Because this function already called in
free_page, so it marked shadow memory twice.
Solution:
1, make shadow do not out of range if a tail page was freed and
been realloc again.
2, remove call of kasan_free_pages.
Verify:
X301
Change-Id: Ib5bdcbb618a783920009bb97d112c361888b0d7c
Signed-off-by: Tao Zeng <tao.zeng@amlogic.com>