From: "Dale J. Stephenson" <dalestephenson@mac.com>
To: linux-lvm@sistina.com
Subject: [linux-lvm] Snapshot resizing memory leak
Date: Mon Mar 3 12:28:01 2003 [thread overview]
Message-ID: <3E63C91A.9030803@mac.com> (raw)
It looks like the current lvm code still has the memory leak when
resizing snapshots. The lv_block_exception and lv_snapshot_hash_table
fields are set to ones newly allocated for the new size, but the old
ones are not freed. The following patch should fix it:
--- linux/drivers/md/lvm.c.orig Thu Mar 14 08:21:16 2002
+++ linux/drivers/md/lvm.c Thu Mar 14 08:23:07 2002
@@ -2489,6 +2489,8 @@
memcpy(new_lv->lv_block_exception,
old_lv->lv_block_exception, size);
+ vfree(old_lv->lv_block_exception);
+ vfree(old_lv->lv_snapshot_hash_table);
old_lv->lv_remap_end = new_lv->lv_remap_end;
old_lv->lv_block_exception = new_lv->lv_block_exception;
old_lv->lv_snapshot_hash_table =
next reply other threads:[~2003-03-03 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-03 12:28 Dale J. Stephenson [this message]
2003-03-04 6:05 ` [linux-lvm] Snapshot resizing memory leak Heinz J . Mauelshagen
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=3E63C91A.9030803@mac.com \
--to=dalestephenson@mac.com \
--cc=linux-lvm@sistina.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.