On Sun, Jan 14, 2001 at 05:32:34PM +0100, Andrea Arcangeli wrote:
> BTW, I can easily reproduce. I was near to go into it yesterday but got
> interrupted by other issues (like the merging of the 0.9.1-beta1 kernel driver
> and extraction of the strictly necessary fixes from the 0.9.1-beta1 userspace
> against 0.9).
This looks the right fix for the vgexport segfault trivially reproducible
on 0.9 and 0.9.1_beta1 lvmtools. Now that I see the details of the bug
it was possible to reproduce it also with `vgdisplay -D xxxxxxx' where
xxxxxxx is just a random name of a not existent VG.
--- ./tools/lib/pv_read_all_pv_of_vg.c.~1~ Mon Jan 15 03:35:51 2001
+++ ./tools/lib/pv_read_all_pv_of_vg.c Mon Jan 15 04:57:00 2001
@@ -137,6 +137,11 @@
while ( pv_this[np] != NULL) np++;
}
+ if ( np == 0) {
+ ret = -LVM_EPV_READ_ALL_PV_OF_VG_NP;
+ goto pv_read_all_pv_of_vg_end;
+ }
+
/* avoid multiple access pathes */
for ( p = 0; pv_this[p] != NULL; p++) {
/* avoid multiple access pathes for now (2.4.0-test8)
I also got a reminder from Marco d'Itri to integrate this hack for
some more non-x86 platform:
--- ./tools/lib/pv_get_size.c.~1~ Mon Jan 15 03:35:51 2001
+++ ./tools/lib/pv_get_size.c Mon Jan 15 04:04:03 2001
@@ -58,7 +58,7 @@
#define read_le(x) (x)
#endif
-#if !defined(__alpha__) && !defined(__s390__)
+#ifdef __i386__
int pv_get_size ( char *dev_name, struct partition *part_ptr) {
int i = 0;
int dir_cache_count = 0;
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/