All of lore.kernel.org
 help / color / mirror / Atom feed
From: zkabelac@sourceware.org <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW lib/format1/format1.c lib/for ...
Date: 27 Feb 2012 11:23:16 -0000	[thread overview]
Message-ID: <20120227112316.32615.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac at sourceware.org	2012-02-27 11:23:15

Modified files:
	.              : WHATS_NEW 
	lib/format1    : format1.c 
	lib/format_pool: format_pool.c 

Log message:
	Check for vg_name existance
	
	Since vg_read() mda ops could be called with NULL vg_name,
	check it before derefence also for pool and format1.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2315&r2=1.2316
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format1/format1.c.diff?cvsroot=lvm2&r1=1.148&r2=1.149
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_pool/format_pool.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54

--- LVM2/WHATS_NEW	2012/02/27 11:13:48	1.2315
+++ LVM2/WHATS_NEW	2012/02/27 11:23:15	1.2316
@@ -1,5 +1,6 @@
 Version 2.02.94 - 
 ====================================
+  Check for existance of vg_name in _format1/_pool_vg_read().
   Fix missing break in _format_pvsegs (2.02.92).
   Test seg pointer for non-null it in raid_target_percent error path.
   Check for errors in _init_tags() during config loading.
--- LVM2/lib/format1/format1.c	2012/02/23 13:11:09	1.148
+++ LVM2/lib/format1/format1.c	2012/02/27 11:23:15	1.149
@@ -186,7 +186,8 @@
 	DM_LIST_INIT(pvs);
 
 	/* Strip dev_dir if present */
-	vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
+	if (vg_name)
+		vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
 
 	if (!(vg = alloc_vg("format1_vg_read", fid->fmt->cmd, NULL)))
 		return_NULL;
--- LVM2/lib/format_pool/format_pool.c	2012/02/23 13:11:09	1.53
+++ LVM2/lib/format_pool/format_pool.c	2012/02/27 11:23:15	1.54
@@ -110,7 +110,8 @@
 	/* We can safely ignore the mda passed in */
 
 	/* Strip dev_dir if present */
-	vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
+	if (vg_name)
+		vg_name = strip_dir(vg_name, fid->fmt->cmd->dev_dir);
 
 	/* Set vg_name through read_pool_pds() */
 	if (!(vg = alloc_vg("pool_vg_read", fid->fmt->cmd, NULL)))



             reply	other threads:[~2012-02-27 11:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 11:23 zkabelac [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-02-13 11:04 LVM2 ./WHATS_NEW lib/format1/format1.c lib/for zkabelac
2012-02-13 10:56 zkabelac
2012-02-08 10:49 zkabelac
2011-03-11 15:10 prajnoha
2011-03-11 14:50 prajnoha
2011-03-11 14:38 prajnoha
2011-03-11 14:30 prajnoha
2010-10-05 17:34 wysochanski
2009-07-30 17:45 snitzer
2009-04-10  9:59 mbroz
2009-02-25 23:29 mbroz
2009-02-25 23:47 ` Alasdair G Kergon

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=20120227112316.32615.qmail@sourceware.org \
    --to=zkabelac@sourceware.org \
    --cc=lvm-devel@redhat.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.