[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <53396F4D.50402@redhat.com>
Date: Mon, 31 Mar 2014 09:36:13 -0400
From: Prarit Bhargava <prarit@...hat.com>
To: Andi Kleen <andi@...stfloor.org>
CC: linux-kernel@...r.kernel.org,
Josh Boyer <jwboyer@...oraproject.org>,
Rob Landley <rob@...dley.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH] Add initcall_blacklist kernel parameter [v2]
On 03/31/2014 09:04 AM, Andi Kleen wrote:
>> do_initcall_level(level);
>> +
>> + list_for_each_safe(tmp, next, &blacklisted_initcalls) {
>> + entry = list_entry(tmp, struct blacklist_entry, next);
>> + free_bootmem(entry->buf, strlen(entry->buf));
>> + free_bootmem(entry, sizeof(*entry));
>
> Does that really work? At this point the bootmem allocator should
> be already finished, so no memory will be freed.
Oh, geez ... that's a good point. I completely missed that.
>
> For this case it's probably ok to leak it.
Okay ... maybe that's an option.
>
> Alternatively you could use static arrays and storing pointer/len.
>
Yeah, I was thinking about the pros-cons of doing static vs. dynamic. I was
planning on doing an array of 5 but kept falling into the trap of "how much is
too much or too little?".
Does anyone object to a static array? If not I'll bang out a static version for
[v3] tomorrow ...
P.
> -Andi
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists