Package: lvm10 Severity: grave Tags: patch Justification: causes non-serious data loss
Function vg_create_dir_and_group_and_nodes() in tools/lib/vg_create_dir_and_group_and_nodes.c has "vg_check_consistency_with_pv_and_lv < 0", which compares the address of the function instead of the return value of invoking it. Failing to properly invoke this check lead to data loss. This is invalid C, though gcc 3.x and 4.x accept it. The bug was detected using Elsa <http://www.cs.berkeley.edu/~smcpeak/elkhound/>. diff -ub 1.0.8/tools/lib/vg_create_dir_and_group_and_nodes.c.orig 1.0.8/tools/lib/vg_create_dir_and_group_and_nodes.c --- 1.0.8/tools/lib/vg_create_dir_and_group_and_nodes.c.orig 2005-08-11 01:35:30.000000000 -0700 +++ 1.0.8/tools/lib/vg_create_dir_and_group_and_nodes.c 2005-08-11 01:35:42.000000000 -0700 @@ -46,7 +46,7 @@ debug_enter ( "vg_create_dir_and_group_and_nodes -- CALLED\n"); - if ( vg == NULL || vg_check_consistency_with_pv_and_lv < 0 || + if ( vg == NULL || vg_check_consistency_with_pv_and_lv() < 0 || opt_v < 0) { ret = -LVM_EPARAM; goto vg_create_dir_and_group_and_nodes_end; -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]