kmemleak: Cannot insert 0xffffff806e24f000 into the object search tree (overlaps existing) [RPi CM4]

Marco Elver elver at google.com
Tue Aug 16 08:46:43 PDT 2022


On Tue, 16 Aug 2022 at 17:32, Catalin Marinas <catalin.marinas at arm.com> wrote:
[...]
> > Right, looks like the kfence fix didn't need to be in 5.19. In any
> > case, this patch I just sent:
> >
> > https://lore.kernel.org/all/20220816142529.1919543-1-elver@google.com/
> >
> > fixes the issue for 5.19 as well, because memblock has always used
> > kmemleak's kmemleak_*_phys() API and technically we should free it
> > through phys as well.
> >
> > As far as I can tell, that's also the right thing to do in 6.0-rc1
> > with 0c24e061196c2, because we have the slab post-alloc hooks that
> > want to register kfence objects via kmemleak. Unless of course somehow
> > both "ignore" and "free" works, but "ignore" just sounds wrong in this
> > case. Any thoughts?
>
> Since commit 0c24e061196c2, kmemleak has different namespaces for the
> virtual and physical addresses and there is no risk of overlap. So the
> comment in your proposed fix can be confusing in 6.0-rc1 (but fine in
> 5.19).

Makes sense.

> In general, if an object is allocated and never freed,
> kmemleak_ignore*() is more appropriate, so I'm more inclined to only
> send your kmemleak_free_part_phys() fix to 5.19.x rather than mainline.

So it sounds like we should just ask stable to revert 07313a2b29ed
then, if the patch switching to kmemleak_free_part_phys() should not
go to 6.0. Is that the most reasonable option? If so, I'll go ahead
and send stable the email to do so.

Thanks,
-- Marco



More information about the linux-arm-kernel mailing list