All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
@ 2008-07-09 11:48 Bernhard Walle
  2008-07-10  1:16 ` Ken'ichi Ohmichi
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2008-07-09 11:48 UTC (permalink / raw)
  To: kexec; +Cc: Ken'ichi Ohmichi

Hi,

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.


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");
+		return 0;
+	}
+
 	len = SIZE(nodemask_t);
 	vt.node_online_map_len = len/sizeof(unsigned long);
 	if (!(vt.node_online_map = (unsigned long *)malloc(len))) {

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  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
  2008-07-10  8:51   ` Bernhard Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Ken'ichi Ohmichi @ 2008-07-10  1:16 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: kexec

[-- 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  2008-07-10  1:16 ` Ken'ichi Ohmichi
@ 2008-07-10  8:51   ` Bernhard Walle
  2008-07-10  8:59     ` Ken'ichi Ohmichi
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2008-07-10  8:51 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: kexec

* Ken'ichi Ohmichi [2008-07-10 10:16]:
>
> > 
> > +	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");

Sounds fine, thanks.



Bernhard
-- 
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  2008-07-10  8:51   ` Bernhard Walle
@ 2008-07-10  8:59     ` Ken'ichi Ohmichi
  2008-07-10  9:01       ` Bernhard Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Ken'ichi Ohmichi @ 2008-07-10  8:59 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: kexec

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


Hi Bernhard,

Bernhard Walle wrote:
> * Ken'ichi Ohmichi [2008-07-10 10:16]:
>>> +	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");
> 
> Sounds fine, thanks.

Thank you for the response.
I merged this patch into DEVEL tree, and I'll merge it into
the next release too.


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  2008-07-10  8:59     ` Ken'ichi Ohmichi
@ 2008-07-10  9:01       ` Bernhard Walle
  2008-07-10  9:20         ` Ken'ichi Ohmichi
  0 siblings, 1 reply; 7+ messages in thread
From: Bernhard Walle @ 2008-07-10  9:01 UTC (permalink / raw)
  To: kexec

* Ken'ichi Ohmichi [2008-07-10 17:59]:
> Bernhard Walle wrote:
> > * Ken'ichi Ohmichi [2008-07-10 10:16]:
> >>> +	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");
> > 
> > Sounds fine, thanks.
> 
> Thank you for the response.
> I merged this patch into DEVEL tree, and I'll merge it into
> the next release too.

Any plans when you make the next release?



Bernhard
-- 
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  2008-07-10  9:01       ` Bernhard Walle
@ 2008-07-10  9:20         ` Ken'ichi Ohmichi
  2008-07-10  9:22           ` Bernhard Walle
  0 siblings, 1 reply; 7+ messages in thread
From: Ken'ichi Ohmichi @ 2008-07-10  9:20 UTC (permalink / raw)
  To: Bernhard Walle; +Cc: kexec

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


Hi,

Bernhard Walle wrote:
> * Ken'ichi Ohmichi [2008-07-10 17:59]:
>> Bernhard Walle wrote:
>>> * Ken'ichi Ohmichi [2008-07-10 10:16]:
>>>>> +	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");
>>> Sounds fine, thanks.
>> Thank you for the response.
>> I merged this patch into DEVEL tree, and I'll merge it into
>> the next release too.
> 
> Any plans when you make the next release?

I will do some tests, and will release it by 18 July.


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] makedumpfile: Improve error handing when SIZE(nodemask_t) is undefined
  2008-07-10  9:20         ` Ken'ichi Ohmichi
@ 2008-07-10  9:22           ` Bernhard Walle
  0 siblings, 0 replies; 7+ messages in thread
From: Bernhard Walle @ 2008-07-10  9:22 UTC (permalink / raw)
  To: Ken'ichi Ohmichi; +Cc: kexec

* Ken'ichi Ohmichi [2008-07-10 18:20]:
> Bernhard Walle wrote:
> > * Ken'ichi Ohmichi [2008-07-10 17:59]:
> >> Bernhard Walle wrote:
> >>> * Ken'ichi Ohmichi [2008-07-10 10:16]:
> >>>>> +	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");
> >>> Sounds fine, thanks.
> >> Thank you for the response.
> >> I merged this patch into DEVEL tree, and I'll merge it into
> >> the next release too.
> > 
> > Any plans when you make the next release?
> 
> I will do some tests, and will release it by 18 July.

Sounds fine!



Bernhard
-- 
Bernhard Walle, SUSE LINUX Products GmbH, Architecture Development

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-07-10  9:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.