All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Guthro <bguthro@virtualiron.com>
To: xen-devel@lists.xensource.com
Cc: Josh Nicholas <jnicholas@virtualiron.com>
Subject: [PATCH] Fix double-free in tapdisk cleanup
Date: Mon, 27 Aug 2007 15:02:37 -0400	[thread overview]
Message-ID: <46D31FCD.8020300@virtualiron.com> (raw)

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

Fixed double-free() during normal tapdisk cleanup for quit process

Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>


[-- Attachment #2: tapdisk-cleanup-fix.patch --]
[-- Type: text/x-patch, Size: 638 bytes --]

diff -r 58aa2447f212 tools/blktap/drivers/tapdisk.c
--- a/tools/blktap/drivers/tapdisk.c	Wed Jul 11 15:26:55 2007 -0400
+++ b/tools/blktap/drivers/tapdisk.c	Wed Jul 11 15:26:58 2007 -0400
@@ -849,6 +849,8 @@ int main(int argc, char *argv[])
 		exit(-1);
 	}
 
+	DPRINTF("running R: '%s' W: '%s'\n", argv[1], argv[2]);
+
 	while (run) 
         {
 		ret = 0;
@@ -914,12 +916,13 @@ int main(int argc, char *argv[])
 		s = ptr->s;
 
 		unmap_disk(s);
-		free(s->blkif);
-		free(s->ring_info);
-		free(s);
+
 		close(ptr->tap_fd);
 		ptr = ptr->next;
 	}
+
+	DPRINTF("done R: '%s' W: '%s'\n", argv[1], argv[2]);
+
 	closelog();
 
 	return 0;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

                 reply	other threads:[~2007-08-27 19:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=46D31FCD.8020300@virtualiron.com \
    --to=bguthro@virtualiron.com \
    --cc=jnicholas@virtualiron.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.