From: Chao Fan <cfan@redhat.com>
To: kexec@lists.infradead.org
Cc: Chao Fan <cfan@redhat.com>
Subject: [PATCH]makedumpfile.c: check rhe return value ofset_page_size
Date: Mon, 24 Aug 2015 11:15:52 +0800 [thread overview]
Message-ID: <1440386153-21638-2-git-send-email-cfan@redhat.com> (raw)
In-Reply-To: <1440386153-21638-1-git-send-email-cfan@redhat.com>
check_return: Calling function "set_page_size" without checking
return value (as is done elsewhere 5 out of 6 times).
makedumpfile.c:8793: example_checked: "set_page_size(dh.block_size)"
has its value checked in "set_page_size(dh.block_size)". But in
makedumpfile.c:3213, the function "set_page_size" will not check
the return value.
Signed-off-by: Chao Fan <cfan@redhat.com>
---
makedumpfile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/makedumpfile.c b/makedumpfile.c
index 32f5459..53efc04 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -3213,7 +3213,8 @@ initial(void)
MSG("because the cyclic mode doesn't support sadump format.\n");
}
- set_page_size(sadump_page_size());
+ if (!set_page_size(sadump_page_size()))
+ return FALSE;
if (!sadump_initialize_bitmap_memory())
return FALSE;
--
2.4.3
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2015-08-24 3:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-24 3:15 [PATCH]makedumpfile.h:makedumpfile.h: check the return value Chao Fan
2015-08-24 3:15 ` Chao Fan [this message]
2015-08-24 3:26 ` [PATCH]makedumpfile.c: check rhe return value ofset_page_size Chao Fan
2015-08-24 3:15 ` [PATCH] sadump_info.c: unsigned_compare: This less-than-zero comparison of an unsigned value is never true Chao Fan
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=1440386153-21638-2-git-send-email-cfan@redhat.com \
--to=cfan@redhat.com \
--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