lkml.org 
[lkml]   [2021]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] tracing: Fixes to bootconfig memory management
On Tue, 14 Sep 2021 11:01:31 -0700
Linus Torvalds <torvalds@linux-foundation.org> wrote:

> All of these are just plain wrong:

I'll revert these, and expect Masami to address the issues you present.

Note, they do fix a real bug as shown by:

https://lore.kernel.org/all/e5c7ce5b-93f0-b305-de32-c99d0390eb28@suse.cz/

>
> > +static void *init_xbc_data_copy __initdata;
> > +static phys_addr_t init_xbc_data_size __initdata;
> > + init_xbc_data_copy = copy;
> > + init_xbc_data_size = size + 1;
> > + memblock_free(__pa(init_xbc_data_copy), init_xbc_data_size);
>
> because the xbc code already saves these as xbc_data/xbc_data_size and
> that final free should just be done in xbc_destroy_all().
>
> So this fix is pointlessly ugly to begin with.
>
> But what I _really_ ended up reacting to was that
>
> > + memblock_free(__pa(copy), size + 1);

Should we hold off until mm has fixed this issue?

-- Steve

\
 
 \ /
  Last update: 2021-09-14 21:00    [W:0.077 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site