[linux-lvm] lvcreate segfault in vg_setup_pointers_for_snapshots

Paul Jakma paulj at alphyra.ie
Thu Oct 4 10:31:15 UTC 2001


ok... looking at tools/lib/vg_setup_pointers_for_snapshots():

 if ( vg == NULL) goto vg_setup_pointers_for_snapshots_end;
   for ( l = 0; l < vg->lv_max; l++) {
      lv_t *lv_chain_ptr = vg->lv[l];
      if ( lv_chain_ptr == NULL) continue;
      if ( lv_chain_ptr->lv_access & LV_SNAPSHOT_ORG) {

isn't this a wee bit suspect? we test for NULL /after/ the assignment, 
and continue anyway? next line deferences that pointer, irregardless 
of the test for previously..

anyway... this isn't my problem, vg->lv_max[1] / lv_chain_ptr is not 
null, it's invalid.

anyone know how to get a longer backtrace from gdb?

--paulj






More information about the linux-lvm mailing list