1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-31 05:47:43 +03:00
Peter Rajnoha f6f32f39e4 report: dup cache policy name string for report in cache_policy field
The cache policy name taken as LV segment property must be duped
for report as the VG/LV/seg structure is destroyed after processing,
reporting happens later:

$ valgrind lvs -o+cache_policy
...
==16589== Invalid read of size 1
==16589==    at 0x54ABCC3: dm_report_compact_fields
(libdm-report.c:1739)
==16589==    by 0x153FC7: _report (reporter.c:619)
==16589==    by 0x1540A6: lvs (reporter.c:641)
==16589==    by 0x148021: lvm_run_command (lvmcmdline.c:1452)
==16589==    by 0x1495CB: lvm2_main (lvmcmdline.c:1907)
==16589==    by 0x164712: main (lvm.c:21)
==16589==  Address 0x7d465f2 is 8,338 bytes inside a block of size
16,384 free'd
==16589==    at 0x4C2ACE9: free (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==16589==    by 0x54B8C85: _free_chunk (pool-fast.c:318)
==16589==    by 0x54B84FB: dm_pool_destroy (pool-fast.c:78)
==16589==    by 0x1E59C7: _free_vg (vg.c:78)
==16589==    by 0x1E5A6D: release_vg (vg.c:95)
==16589==    by 0x159B6E: _process_lv_vgnameid_list (toollib.c:1967)
==16589==    by 0x159DD7: process_each_lv (toollib.c:2030)
==16589==    by 0x153ED8: _report (reporter.c:598)
==16589==    by 0x1540A6: lvs (reporter.c:641)
==16589==    by 0x148021: lvm_run_command (lvmcmdline.c:1452)
==16589==    by 0x1495CB: lvm2_main (lvmcmdline.c:1907)
==16589==    by 0x164712: main (lvm.c:21)
2014-12-18 11:54:40 +01:00
..
2014-10-30 23:58:49 +01:00
2014-11-13 17:49:42 +01:00
2014-10-24 16:39:30 +02:00
2014-10-30 23:58:49 +01:00
2014-11-13 17:49:42 +01:00
2014-11-11 14:13:00 +00:00
2014-10-30 23:58:49 +01:00
2014-11-18 16:50:49 +01:00
2014-10-30 23:58:49 +01:00
2014-11-10 22:05:49 +01:00
2014-11-18 16:50:49 +01:00
2014-11-10 22:05:48 +01:00
2014-10-30 23:58:49 +01:00
2014-11-10 22:05:48 +01:00
2014-10-30 23:58:49 +01:00
2014-03-12 19:12:34 +01:00
2014-11-13 17:49:42 +01:00