Skip to contentSkip to conversation

LVM2 ./WHATS_NEW tools/pvresize.c

PATCH [email protected] 1 participant 1 message Oct 25, 2010

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2010-10-25 12:01:38

Modified files:
. : WHATS_NEW
tools : pvresize.c

Log message:
Print vg_name and do not to access vg->name

Reported by clang as: Logic error Dereference of null pointer Replace pointer dereference with vg_name.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1770&r2=1.1771
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/pvresize.c.diff?cvsroot=lvm2&r1=1.35&r2=1.36

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.75 - 
 =====================================
+  Fix pointer for VG name in _pv_resize_single error code path.
   Fix warning for changed alignment requirements for dmeventd read/write func.
   Add global/metadata_read_only to use unrepaired metadata in read-only cmds.
   Don't take write lock in vgchange --refresh, --poll or --monitor.
tools/pvresize.c +1 -1
@@ -148,7 +148,7 @@
 	if (!is_orphan_vg(vg_name)) {
 		if (!vg_write(vg) || !vg_commit(vg)) {
 			log_error("Failed to store physical volume \"%s\" in "
-				  "volume group \"%s\"", pv_name, vg->name);
+				  "volume group \"%s\"", pv_name, vg_name);
 			goto out;
 		}
 		backup(vg);