Patch for vg_status_with_pv_and_lv.c
A minor patch to prevent a possible segfault -- if an error occurs getting the lv list, vg_setup_pointers_for_snapshot doesn't do well. Patch was originally generated against 1.0.3, but the bug still seems to be in 1.0.6.
tools/lib/vg_status_with_pv_and_lv.c renamed from tools/lib/vg_status_with_pv_and_lv.c.orig +3 -3
@@ -57,10 +57,10 @@for ( p =0 ; pv[p] !=NULL ; p++) (*vg)->pv[p] = pv[p];for ( ; p < (*vg)->pv_max; p++) (*vg)->pv[p] =NULL ;for ( l =0 ; l < (*vg)->lv_max; l++) (*vg)->lv[l] = lv[l]; - } -/* Set up core pointers for snapshots */ -vg_setup_pointers_for_snapshots ( *vg); +/* Set up core pointers for snapshots */ +vg_setup_pointers_for_snapshots ( *vg); + }debug_leave ("vg_status_with_pv_and_lv -- LEAVING with ret: %d\n" , ret);return ret;
Accepted.
Thanks,
Heinz -- The LVM Guy --
Quoted 25 lines · Dale J. Stephenson
A minor patch to prevent a possible segfault -- if an error occurs getting the lv list,
vg_setup_pointers_for_snapshotdoesn't do well.
Patch was originally generated against 1.0.3, but the bug still seems
to be in 1.0.6.tools/lib/vg_status_with_pv_and_lv.c renamed from tools/lib/vg_status_with_pv_and_lv.c.orig +3
-3@@ -57,10 +57,10 @@for ( p =0 ; pv[p] !=NULL ; p++) (*vg)->pv[p] = pv[p];for ( ; p < (*vg)->pv_max; p++) (*vg)->pv[p] =NULL ;for ( l =0 ; l < (*vg)->lv_max; l++) (*vg)->lv[l] = lv[l]; - } -/* Set up core pointers for snapshots */ -vg_setup_pointers_for_snapshots ( *vg); +/* Set up core pointers for snapshots */ +vg_setup_pointers_for_snapshots ( *vg); + }debug_leave ("vg_status_with_pv_and_lv -- LEAVING with ret: %d\n" , ret);return ret;
Quoted 5 lines
_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-