Centos-kernel-stream-9/drivers/of
Rafael Aquini df1e81c4dd of: reserved-memory: Do not make kmemleak ignore freed address
JIRA: https://issues.redhat.com/browse/RHEL-84184

This patch is a backport of the following upstream commit:
commit 29091a52562bca4d6e678dd8f0085dac119d6a21
Author: Zijun Hu <quic_zijuhu@quicinc.com>
Date:   Thu Jan 9 21:27:01 2025 +0800

    of: reserved-memory: Do not make kmemleak ignore freed address

    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@quicinc.com>
    Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-10-db8a72415b8c@quicinc.com
    Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

Signed-off-by: Rafael Aquini <raquini@redhat.com>
2025-04-18 08:39:50 -04:00
..
unittest-data of: unittest: Add tests for address translations 2024-08-15 15:31:13 -06:00
Kconfig
Makefile
address.c of: address: Fix address translation when address-size is greater than 2 2024-08-15 15:31:13 -06:00
base.c of: Add for_each_reserved_child_of_node() 2025-01-31 16:12:16 -05:00
cpu.c
device.c OF: Simplify of_iommu_configure() 2024-09-20 12:29:01 -07:00
dynamic.c treewide: Fix probing of devices in DT overlays 2024-05-30 04:25:29 -04:00
fdt.c Merge: of: fdt: fix off-by-one error in unflatten_dt_nodes() 2024-05-22 19:58:07 +00:00
fdt_address.c
irq.c of/irq: Prevent device address out-of-bounds read in interrupt map walk 2024-09-18 09:38:54 +00:00
kexec.c arm64, crash: wrap crash dumping code into crash related ifdefs 2024-12-23 09:35:35 +08:00
kobj.c
module.c Merge: CVE-2024-38541: of: module: add buffer overflow check in of_modalias() 2024-11-05 11:44:53 +00:00
of_numa.c
of_private.h Merge: update drivers/base to match Linux v6.6 2024-07-12 14:11:54 +00:00
of_reserved_mem.c of: reserved-memory: Do not make kmemleak ignore freed address 2025-04-18 08:39:50 -04:00
overlay.c
pdt.c
platform.c Merge: drivers/video backport from v6.11 2024-12-05 16:12:49 +00:00
property.c of: property: fw_devlink: Fix stupid bug in remote-endpoint parsing 2024-05-30 04:25:29 -04:00
resolver.c
unittest.c of: unittest: Add tests for address translations 2024-08-15 15:31:13 -06:00