On Mon, May 14, 2018 at 6:56 PM, Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx> wrote: > > > On 05/08/2018 08:20 PM, Andrey Konovalov wrote: > >> diff --git a/mm/slub.c b/mm/slub.c >> index 44aa7847324a..4fcd1442a761 100644 >> --- a/mm/slub.c >> +++ b/mm/slub.c >> @@ -1351,10 +1351,10 @@ static inline void dec_slabs_node(struct kmem_cache *s, int node, >> * Hooks for other subsystems that check memory allocations. In a typical >> * production configuration these hooks all should produce no code at all. >> */ >> -static inline void kmalloc_large_node_hook(void *ptr, size_t size, gfp_t flags) >> +static inline void kmalloc_large_node_hook(void **ptr, size_t size, gfp_t flags) >> { >> - kmemleak_alloc(ptr, size, 1, flags); >> - kasan_kmalloc_large(ptr, size, flags); >> + kmemleak_alloc(*ptr, size, 1, flags); >> + *ptr = kasan_kmalloc_large(*ptr, size, flags); > > Why not 'return ptr' like everywhere else? Will fix in v2, thanks!