Michal Hocko wrote: > I've found the previous report [1] finally. Adding Chunyu Hu to the CC > list. The report which triggered this one is [2] > > [1] http://lkml.kernel.org/r/1524243513-29118-1-git-send-email-chuhu@xxxxxxxxxx > [2] http://lkml.kernel.org/r/CA+7wUswp_Sr=hHqi1bwRZ3FE2wY5ozZWZ8Z1BgrFnSAmijUKjA@xxxxxxxxxxxxxx > > I am not really familiar with the kmemleak code but the expectation that > you can make a forward progress in an unknown allocation context seems > broken to me. Why kmemleak cannot pre-allocate a pool of object_cache > and refill it from a reasonably strong contexts (e.g. in a sleepable > context)? Or, we can undo the original allocation if the kmemleak allocation failed? kmalloc(size, gfp) { ptr = do_kmalloc(size, gfp); if (ptr) { object = do_kmalloc(size, gfp_kmemleak_mask(gfp)); if (!object) { kfree(ptr); return NULL; } // Store information of ptr into object. } return ptr; }