All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org,
	Josh Boyer <jwboyer@fedoraproject.org>,
	Rob Landley <rob@landley.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH] Add initcall_blacklist kernel parameter [v2]
Date: Mon, 31 Mar 2014 09:36:13 -0400	[thread overview]
Message-ID: <53396F4D.50402@redhat.com> (raw)
In-Reply-To: <20140331130417.GG22728@two.firstfloor.org>



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
> 

      reply	other threads:[~2014-03-31 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 12:52 [PATCH] Add initcall_blacklist kernel parameter [v2] Prarit Bhargava
2014-03-31 13:04 ` Andi Kleen
2014-03-31 13:36   ` Prarit Bhargava [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53396F4D.50402@redhat.com \
    --to=prarit@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=fweisbec@gmail.com \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rob@landley.net \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.