public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Travis <travis@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	LKML <linux-kernel@vger.kernel.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>
Subject: Re: [PULL}: latest tip/cpus4096 changes
Date: Fri, 16 Jan 2009 09:55:17 -0800	[thread overview]
Message-ID: <4970CA05.8010303@sgi.com> (raw)
In-Reply-To: <20090116093442.GE4305@elte.hu>

Ingo Molnar wrote:
> * Mike Travis <travis@sgi.com> wrote:
> 
>> --- a/arch/x86/kernel/microcode_core.c
>> +++ b/arch/x86/kernel/microcode_core.c
>> @@ -104,7 +104,7 @@ static struct microcode_ops *microcode_ops;
>>  /* no concurrent ->write()s are allowed on /dev/cpu/microcode */
>>  static DEFINE_MUTEX(microcode_mutex);
>>  
>> -struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
>> +struct ucode_cpu_info *ucode_cpu_info;
>>  EXPORT_SYMBOL_GPL(ucode_cpu_info);
>>  
>>  #ifdef CONFIG_MICROCODE_OLD_INTERFACE
>> @@ -471,6 +471,13 @@ static int __init microcode_init(void)
>>  {
>>  	struct cpuinfo_x86 *c = &cpu_data(0);
>>  	int error;
>> +	size_t size = sizeof(*ucode_cpu_info) * nr_cpu_ids;
>> +
>> +	ucode_cpu_info = kmalloc(size, GFP_KERNEL);
>> +	if (!ucode_cpu_info) {
>> +		WARN(1, "CPU: cannot allocate microcode info structure\n");
>> +		return -ENOMEM;
>> +	}
>>  
>>  	if (c->x86_vendor == X86_VENDOR_INTEL)
>>  		microcode_ops = init_intel_microcode();
> 
> look how this code continues:
> 
>         else if (c->x86_vendor == X86_VENDOR_AMD)
>                 microcode_ops = init_amd_microcode();
> 
>         if (!microcode_ops) {
>                 printk(KERN_ERR "microcode: no support for this CPU vendor\n");
>                 return -ENODEV;
>         }
> 
> see the memory leak? Again, this patch too is trivially broken.
> 
>> commit beec9183a43f8a42f5b790326a3b120a3b513590
>> Author: Mike Travis <travis@sgi.com>
>> Date:   Fri Jan 16 00:22:33 2009 -0800
>>
>>     xen: reduce static memory usage
> 
> this one looks good in a quick check but please send it to Jeremy first or 
> get his Ack.
> 
> 	Ingo

Ok, thanks!


  parent reply	other threads:[~2009-01-16 17:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16  9:05 [PULL}: latest tip/cpus4096 changes Mike Travis
2009-01-16  9:25 ` Ingo Molnar
2009-01-16 17:53   ` Mike Travis
2009-01-16 22:30     ` Ingo Molnar
2009-01-16 23:22       ` [PATCH] x86: put trigger in to detect mismatched apic versions Mike Travis
2009-01-17  0:06         ` Mike Travis
2009-01-17  3:07         ` Jack Steiner
2009-01-18 19:08           ` Ingo Molnar
2009-01-18 21:25             ` Jack Steiner
2009-01-19 17:08               ` Mike Travis
2009-01-18 19:04         ` Ingo Molnar
2009-01-16  9:28 ` [PULL}: latest tip/cpus4096 changes Ingo Molnar
2009-01-16 17:54   ` Mike Travis
2009-01-16  9:34 ` Ingo Molnar
2009-01-16 17:08   ` Jeremy Fitzhardinge
2009-01-16 19:55     ` Mike Travis
2009-01-16 21:15       ` Jeremy Fitzhardinge
2009-01-16 17:55   ` Mike Travis [this message]
2009-01-16 14:25 ` Ingo Molnar
2009-01-16 18:03   ` Mike Travis
2009-01-16 22:32     ` Ingo Molnar

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=4970CA05.8010303@sgi.com \
    --to=travis@sgi.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox