mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
3aef5ae7fb
Invalid primary_vginfo was supposed to move all its lvmcache_infos to orphan_vginfo - however it has called _drop_vginfo() inside the loop that released primary_vginfo itself - thus made the loop using released memory. Use _vginfo_detach_info() instead and call _drop_vginfo after th loop is finished. Valgrind trace it should fix: Invalid read of size 8 at 0x41E960: _lvmcache_update_vgname (lvmcache.c:1229) by 0x41EF86: lvmcache_update_vgname_and_id (lvmcache.c:1360) by 0x441393: _text_read (text_label.c:329) by 0x442221: label_read (label.c:289) by 0x41CF92: lvmcache_label_scan (lvmcache.c:635) by 0x45B303: _vg_read_by_vgid (metadata.c:3342) by 0x45B4A6: lv_from_lvid (metadata.c:3381) by 0x41B555: lv_activation_filter (activate.c:1346) by 0x415868: do_activate_lv (lvm-functions.c:343) by 0x415E8C: do_lock_lv (lvm-functions.c:532) by 0x40FD5F: do_command (clvmd-command.c:120) by 0x413D7B: process_local_command (clvmd.c:1686) Address 0x63eba10 is 16 bytes inside a block of size 160 free'd at 0x4C2756E: free (vg_replace_malloc.c:366) by 0x41DE70: _free_vginfo (lvmcache.c:980) by 0x41DEDA: _drop_vginfo (lvmcache.c:998) by 0x41E854: _lvmcache_update_vgname (lvmcache.c:1238) by 0x41EF86: lvmcache_update_vgname_and_id (lvmcache.c:1360) by 0x441393: _text_read (text_label.c:329) by 0x442221: label_read (label.c:289) by 0x41CF92: lvmcache_label_scan (lvmcache.c:635) by 0x45B303: _vg_read_by_vgid (metadata.c:3342) by 0x45B4A6: lv_from_lvid (metadata.c:3381) by 0x41B555: lv_activation_filter (activate.c:1346) by 0x415868: do_activate_lv (lvm-functions.c:343) problematic line: dm_list_iterate_items_safe(info2, info3, &primary_vginfo->infos) |
||
---|---|---|
.. | ||
lvmcache.c | ||
lvmcache.h |