Thread (13 messages) 13 messages, 5 authors, 2021-09-17

Re: [GIT PULL] tracing: Fixes to bootconfig memory management

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-09-14 19:38:30
Also in: lkml

On Tue, Sep 14, 2021 at 12:23 PM Linus Torvalds
[off-list ref] wrote:
Actually, never mind. I'll just do the automated replacement, it will
fix that NULL pointer thing too.
Sadly, the automated replacement isn't quite as simple as the
sed-script I planned on using.

Because this:

  sed -i \
    's:memblock_free(__pa(\([^)]*\)),:memblock_free_sane(\1,:' \
    $(git grep -wl memblock_free)

does actually mostly work, but because "__pa()" takes either a pointer
or a integer value, the end result is that sometimes we call
memblock_free_sane() with things that aren't pointers.

Very annoying. That "__pa()" macro has the two underscores for a
reason. It shouldn't be "use this thing willy nilly".

So I'll do a minimal conversion that adds "memblock_free_ptr()" and
hope that people start using that. And then we can later try to move
"memblock_free()" to a name that isn't so misleading.

                  Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help