Pekka Enberg:> No. The pointer returned by cpu_cache_get() is not changed by > cache_alloc_refill(). The contents of the array might change, yes. That > said, we should check if objp is NULL before calling kmemleak_erase().

To test whether objp is NULL or not is another issue.'ac' is changed actually. You can confirm it by inserting WARN_ON_ONCE(ac != cpu_cache_get(cachep));after cache_alloc_refill() in ____cache_alloc().And do you think these comments/code in cache_alloc_refill() are wrong?{ ::: x = cache_grow(cachep, flags | GFP_THISNODE, node, NULL); /* cache_grow can reenable interrupts, then ac could change. */ ac = cpu_cache_get(cachep); :::}