The memory block for relocating lp0 vector is referenced by
a physical address (i.e. tegra_lp0_vec_start) which kmemleak
can't detect. Mark it as not a leak to avoid false positive.
Bug
200007297
Change-Id: Ie137f08d77911677d9e76fdb7d0112a1610dd72d
Signed-off-by: Allen Yu <alleny@nvidia.com>
Reviewed-on: http://git-master/r/414946
Reviewed-by: Harshada Kale <hkale@nvidia.com>
Tested-by: Harshada Kale <hkale@nvidia.com>
#include <linux/tegra-cpuidle.h>
#include <linux/irqchip/tegra.h>
#include <linux/tegra-pm.h>
+#include <linux/kmemleak.h>
#include <trace/events/power.h>
#include <trace/events/nvsecurity.h>
goto out;
}
+ /* Avoid a kmemleak false positive. The allocated memory
+ * block is later referenced by a physical address (i.e.
+ * tegra_lp0_vec_start) which kmemleak can't detect.
+ */
+ kmemleak_not_leak(reloc_lp0);
+
orig = ioremap(tegra_lp0_vec_start, tegra_lp0_vec_size);
WARN_ON(!orig);
if (!orig) {
#include <linux/tegra-cpuidle.h>
#include <linux/irqchip/tegra.h>
#include <linux/tegra-pm.h>
+#include <linux/kmemleak.h>
#include <trace/events/power.h>
#include <trace/events/nvsecurity.h>
goto out;
}
+ /* Avoid a kmemleak false positive. The allocated memory
+ * block is later referenced by a physical address (i.e.
+ * tegra_lp0_vec_start) which kmemleak can't detect.
+ */
+ kmemleak_not_leak(reloc_lp0);
+
orig = ioremap(tegra_lp0_vec_start, tegra_lp0_vec_size);
WARN_ON(!orig);
if (!orig) {