mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
lvmanip: uninitialized members in struct pv_list (#10)
Scenario: Given an existed LV `lvol0`, I want to create another LV
on the PVs used by `lvol0`.
I use `build_parallel_areas_from_lv()` to obtain the `pv_list` of each segments.
However, the returned `pv_list` is not properly initialized, which causes
segfault in subsequent operations.
(cherry picked from commit 859feb81e5
)
This commit is contained in:
parent
d202d54a6c
commit
219ba4f54a
@ -1,5 +1,6 @@
|
||||
Version 2.03.02 -
|
||||
===================================
|
||||
Fix missing proper initialization of pv_list struct when adding pv.
|
||||
Fix (de)activation of RaidLVs with visible SubLVs
|
||||
Prohibit mirrored 'mirror' log via lvcreate and lvconvert
|
||||
Use sync io if async io_setup fails, or use_aio=0 is set in config.
|
||||
|
@ -5951,7 +5951,7 @@ static int _add_pvs(struct cmd_context *cmd, struct pv_segment *peg,
|
||||
if (find_pv_in_pv_list(&spvs->pvs, peg->pv))
|
||||
return 1;
|
||||
|
||||
if (!(pvl = dm_pool_alloc(cmd->mem, sizeof(*pvl)))) {
|
||||
if (!(pvl = dm_pool_zalloc(cmd->mem, sizeof(*pvl)))) {
|
||||
log_error("pv_list allocation failed");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user