1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 11:55:55 +03:00
lvm2/lib/report
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
..
columns-devtypes.h reporting: Add devtypes command. 2013-09-18 01:09:15 +01:00
columns.h report: Add cache_policy and cache_settings (LV) segment fields. 2014-12-17 14:43:12 +01:00
properties.c report: Add cache_policy and cache_settings (LV) segment fields. 2014-12-17 14:43:12 +01:00
properties.h report: select: refactor: move str_list to libdm 2014-06-17 16:27:20 +02:00
report.c report: dup cache policy name string for report in cache_policy field 2014-12-18 11:54:40 +01:00
report.h report: add new LVSSTATUS and SEGSSTATUS report type 2014-11-11 08:53:28 +01:00
values.h report: Add cache_policy and cache_settings (LV) segment fields. 2014-12-17 14:43:12 +01:00