public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
From: zkabelac@sourceware.org
To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org
Subject: LVM2 ./WHATS_NEW lib/raid/raid.c lib/replicato ...
Date: Tue, 28 Feb 2012 14:23:00 -0000	[thread overview]
Message-ID: <20120228142343.28585.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2012-02-28 14:23:42

Modified files:
	.              : WHATS_NEW 
	lib/raid       : raid.c 
	lib/replicator : replicator.c 
	lib/thin       : thin.c 

Log message:
	Revert free of allocated segtype
	
	lvm_register_segtype takes ownership of segtype and call destructor
	for it in error path.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2324&r2=1.2325
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/raid/raid.c.diff?cvsroot=lvm2&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/replicator/replicator.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/thin/thin.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47

--- LVM2/WHATS_NEW	2012/02/28 11:12:58	1.2324
+++ LVM2/WHATS_NEW	2012/02/28 14:23:41	1.2325
@@ -1,5 +1,6 @@
 Version 2.02.94 - 
 ====================================
+  Revert free of allocated segtype in init segment error path (2.02.89).
   Test dm_hash_insert() failures in filter-persistent.c and fid_add_mda().
   Ensure clvmd message is always \0 terminated after read.
   Better detection of missing dmeventd fifo connection (2.02.93).
--- LVM2/lib/raid/raid.c	2012/02/27 10:15:08	1.16
+++ LVM2/lib/raid/raid.c	2012/02/28 14:23:41	1.17
@@ -456,10 +456,9 @@
 
 	do {
 		if ((segtype = raid_segtype_fn[i](cmd)) &&
-		    !lvm_register_segtype(seglib, segtype)) {
-			dm_free(segtype);
+		    !lvm_register_segtype(seglib, segtype))
+			/* segtype is already destroyed */
 			return_0;
-		}
 	} while (raid_segtype_fn[++i]);
 
 	return 1;
--- LVM2/lib/replicator/replicator.c	2012/01/25 21:54:00	1.12
+++ LVM2/lib/replicator/replicator.c	2012/02/28 14:23:42	1.13
@@ -772,10 +772,9 @@
 	segtype->private = NULL;
 	segtype->flags = SEG_REPLICATOR;
 
-	if (!lvm_register_segtype(seglib, segtype)) {
-		dm_free(segtype);
+	if (!lvm_register_segtype(seglib, segtype))
+		/* segtype is already destroyed */
 		return_0;
-	}
 
 	log_very_verbose("Initialised segtype: " REPLICATOR_MODULE);
 
@@ -787,10 +786,9 @@
 	segtype->private = NULL;
 	segtype->flags = SEG_REPLICATOR_DEV;
 
-	if (!lvm_register_segtype(seglib, segtype)) {
-		dm_free(segtype);
+	if (!lvm_register_segtype(seglib, segtype))
+		/* segtype is already destroyed */
 		return_0;
-	}
 
 	log_very_verbose("Initialised segtype: " REPLICATOR_DEV_MODULE);
 
--- LVM2/lib/thin/thin.c	2012/02/15 13:49:52	1.46
+++ LVM2/lib/thin/thin.c	2012/02/28 14:23:42	1.47
@@ -607,10 +607,9 @@
 			segtype->flags |= SEG_MONITORED;
 #  endif /* DMEVENTD */
 #endif
-		if (!lvm_register_segtype(seglib, segtype)) {
-			dm_free(segtype);
+		if (!lvm_register_segtype(seglib, segtype))
+			/* segtype is already destroyed */
 			return_0;
-		}
 
 		log_very_verbose("Initialised segtype: %s", segtype->name);
 	}


                 reply	other threads:[~2012-02-28 14:23 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=20120228142343.28585.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.com \
    --cc=lvm2-cvs@sourceware.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).