Re: [PATCH v4 10/14] of: reserved-memory: Do not make kmemleak ignore freed address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 09 Jan 2025 21:27:01 +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
> 
> early_init_dt_alloc_reserved_memory_arch() will free address @base when
> suffers memblock_mark_nomap() error, but it still makes kmemleak ignore
> the freed address @base via kmemleak_ignore_phys().
> 
> That is unnecessary, besides, also causes unnecessary warning messages:
> 
> kmemleak_ignore_phys()
>  -> make_black_object()
>     -> paint_ptr()
>        -> kmemleak_warn() // warning message here.
> 
> Fix by avoiding kmemleak_ignore_phys() when suffer the error.
> 
> Fixes: 658aafc8139c ("memblock: exclude MEMBLOCK_NOMAP regions from kmemleak")
> Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
> ---
>  drivers/of/of_reserved_mem.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied, thanks!





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux