Re: [PATCHv2] mm: introduce __GFP_TRACKLEAK to track in-kernel allocation

From: Matthew Wilcox
Date: Wed Sep 07 2022 - 08:53:09 EST


On Wed, Sep 07, 2022 at 05:52:37PM +0800, zhaoyang.huang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@xxxxxxxxxx>
>
> Kthread and drivers could fetch memory via alloc_pages directly which make them
> hard to debug when leaking. Solve this by introducing __GFP_TRACELEAK and reuse
> kmemleak mechanism which unified most of kernel cosuming pages into kmemleak.

As I said in my response to v1, this needs (a) documentation and (b) tests.