[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=whBd5Sgg4if7HB4o0Zrj3eNprKv9U02uEUB1QhQvrsQZw@mail.gmail.com>
Date: Tue, 14 Sep 2021 12:38:06 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Mike Rapoport <rppt@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Linux-MM <linux-mm@...ck.org>, Vlastimil Babka <vbabka@...e.cz>
Subject: Re: [GIT PULL] tracing: Fixes to bootconfig memory management
On Tue, Sep 14, 2021 at 12:23 PM Linus Torvalds
<torvalds@...ux-foundation.org> 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
Powered by blists - more mailing lists