From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: Re: [PATCH 1 of 4] KEXEC: Allocate crash notes on boot
Date: Fri, 9 Mar 2012 16:08:23 +0000 [thread overview]
Message-ID: <4F5A2AF7.2090904@citrix.com> (raw)
In-Reply-To: <4F5A32AA020000780007764F@nat28.tlf.novell.com>
On 09/03/12 15:41, Jan Beulich wrote:
>>>> On 09.03.12 at 15:42, Andrew Cooper <andrew.cooper3@citrix.com> wrote:
>> +static int __init kexec_init(void)
>> +{
>> + void *cpu = (void *)(unsigned long)smp_processor_id();
>> +
>> + /* If no crash area, no need to allocate space for notes. */
>> + if ( !kexec_crash_area.size )
>> + return 0;
>> +
>> + register_keyhandler('C', &crashdump_trigger_keyhandler);
> Wouldn't this better be done only after successful crash_notes
> allocation below?
Yes
>> +
>> + crash_notes = xmalloc_array(crash_note_range_t, nr_cpu_ids);
>> + if ( ! crash_notes )
>> + return -ENOMEM;
>> +
>> + memset(crash_notes, 0, sizeof(crash_note_range_t) * nr_cpu_ids);
> Using xzalloc_array() above would be preferred.
>
Doh! I started this patch against unstable, with xzalloc, then ported to
4.1 without xzalloc, then ported back to unstable and forgot to change.
I will respin it
>> +
>> + cpu_callback(&cpu_nfb, CPU_UP_PREPARE, cpu);
>> + register_cpu_notifier(&cpu_nfb);
>> + return 0;
>> +}
> Looks okay otherwise, but I'm still not fully convinced all this is really
> needed.
>
> Jan
>
--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com
next prev parent reply other threads:[~2012-03-09 16:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 14:42 [PATCH 0 of 4] KEXEC subsystem fixes and changes Andrew Cooper
2012-03-09 14:42 ` [PATCH 1 of 4] KEXEC: Allocate crash notes on boot Andrew Cooper
2012-03-09 15:41 ` Jan Beulich
2012-03-09 16:08 ` Andrew Cooper [this message]
2012-03-09 16:58 ` Jan Beulich
2012-03-09 14:42 ` [PATCH 2 of 4] x86: Introduce "top_of_mem" Andrew Cooper
2012-03-09 15:43 ` Jan Beulich
2012-03-09 16:46 ` Andrew Cooper
2012-03-09 17:00 ` Jan Beulich
2012-03-09 14:42 ` [PATCH 3 of 4] KEXEC: Allocate crash structures in low memory Andrew Cooper
2012-03-09 15:52 ` Keir Fraser
2012-03-09 16:24 ` Andrew Cooper
2012-03-09 16:30 ` Keir Fraser
2012-03-09 15:55 ` Jan Beulich
2012-03-09 17:01 ` Andrew Cooper
2012-03-09 14:42 ` [PATCH 4 of 4] KEXEC: Introduce new crashtables interface Andrew Cooper
2012-03-09 16:11 ` Jan Beulich
2012-03-09 17:33 ` Andrew Cooper
2012-03-11 9:59 ` Jan Beulich
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=4F5A2AF7.2090904@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=xen-devel@lists.xensource.com \
/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.