Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ken'ichi Ohmichi" <oomichi@mxs.nes.nec.co.jp>
To: Bernhard Walle <bwalle@suse.de>
Cc: kexec@lists.infradead.org
Subject: Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
Date: Thu, 10 Jul 2008 10:16:32 +0900	[thread overview]
Message-ID: <487562F0.8020606@mxs.nes.nec.co.jp> (raw)
In-Reply-To: <20080709134801.149fbdb4@halley.suse.de>

[-- Attachment #1: Type: text/plain, Size: 992 bytes --]


Hi Bernhard,

Bernhard Walle wrote:
> I accidentally used a new makedumpfile with an old VMCOREINFO that did
> not contain the SIZE(nodemask_t). Then len was -1, and malloc(-1)
> failed. Which looked like memory was too low.
> 
> This patch just improves the error message in that case so that the
> user knows what is wrong.

Thank you for the patch.
I agree to add this check method.


> Signed-off-by: Bernhard Walle <bwalle@suse.de>
> 
> ---
>  makedumpfile.c |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff -u -r1.7.2.37 makedumpfile.c
> --- makedumpfile.c	9 Jul 2008 00:22:09 -0000	1.7.2.37
> +++ makedumpfile.c	9 Jul 2008 11:39:43 -0000
> @@ -2580,6 +2580,11 @@
>  	    && (SYMBOL(node_states) == NOT_FOUND_SYMBOL))
>  		return 0;
> 
> +	if (SIZE(nodemask_t) == NOT_FOUND_LONG_VALUE) {
> +		ERRMSG("SIZE(nodemask_t) undefined.\n");

I like the following message of the same form as another message.

ERRMSG("Can't get the size of nodemask_t.\n");


Thanks
Ken'ichi Ohmichi


[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2008-07-10  1:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-09 11:48 [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined Bernhard Walle
2008-07-10  1:16 ` Ken'ichi Ohmichi [this message]
2008-07-10  8:51   ` Bernhard Walle
2008-07-10  8:59     ` Ken'ichi Ohmichi
2008-07-10  9:01       ` Bernhard Walle
2008-07-10  9:20         ` Ken'ichi Ohmichi
2008-07-10  9:22           ` Bernhard Walle

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=487562F0.8020606@mxs.nes.nec.co.jp \
    --to=oomichi@mxs.nes.nec.co.jp \
    --cc=bwalle@suse.de \
    --cc=kexec@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox