All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arthur Zou <zzou@redhat.com>
To: kexec@lists.infradead.org
Cc: Arthur Zou <zzou@redhat.com>, kumagai-atsushi@mxc.nes.nec.co.jp
Subject: [PATCH] makedumpfile: fix free partial_bitmap2 error
Date: Fri, 25 Apr 2014 09:43:02 +0800	[thread overview]
Message-ID: <1398390182-8480-1-git-send-email-zzou@redhat.com> (raw)

Description:
In create_dump_bitmap, after prepare_bitmap2_buffer_cyclic was invoked,
info->partial_bitmap2 will pointed to a block of contiguous memory. But
free it in a wrong way because what free_bitmap2_buffer() free is
info->bitmap2 not info->partial_bitmap2.

Signed-off-by: Arthur Zou <zzou@redhat.com>
---
 makedumpfile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/makedumpfile.c b/makedumpfile.c
index ce4a866..f0d2997 100644
--- a/makedumpfile.c
+++ b/makedumpfile.c
@@ -5143,7 +5143,8 @@ create_dump_bitmap(void)
 
 			info->num_dumpable = get_num_dumpable_cyclic();
 
-			free_bitmap2_buffer();
+			if (info->partial_bitmap2 != NULL)
+				free(info->partial_bitmap2);
 		}
 
 	} else {
-- 
1.8.4.2


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

             reply	other threads:[~2014-04-25  1:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-25  1:43 Arthur Zou [this message]
2014-04-28  6:21 ` [PATCH] makedumpfile: fix free partial_bitmap2 error Baoquan He
2014-04-28  6:29   ` Baoquan He
2014-04-28  7:28 ` Atsushi Kumagai

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=1398390182-8480-1-git-send-email-zzou@redhat.com \
    --to=zzou@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=kumagai-atsushi@mxc.nes.nec.co.jp \
    /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.