mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
fid: fix reset of PV fid
Avoid hitting memory corruption (double free) in code path, where PV FID has been already destroyed and the released pointer was left in PV structure and could have been tried to be released from there 2nd. time with final context destruction.
This commit is contained in:
parent
55f42944bd
commit
2f1a571c97
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.99 -
|
Version 2.02.99 -
|
||||||
===================================
|
===================================
|
||||||
|
Fix release of PV's fid in free_pv_fid().
|
||||||
Skip monitoring of snapshots that are already bigger then origin.
|
Skip monitoring of snapshots that are already bigger then origin.
|
||||||
Add lv_is_cow_covering_origin() to check if cow covers origin size.
|
Add lv_is_cow_covering_origin() to check if cow covers origin size.
|
||||||
Use libdm dm_get_status_snapshot() to parse snapshot status.
|
Use libdm dm_get_status_snapshot() to parse snapshot status.
|
||||||
|
@ -3402,8 +3402,7 @@ void free_pv_fid(struct physical_volume *pv)
|
|||||||
if (!pv)
|
if (!pv)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (pv->fid)
|
pv_set_fid(pv, NULL);
|
||||||
pv->fid->fmt->ops->destroy_instance(pv->fid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* This is only called by lv_from_lvid, which is only called from
|
/* This is only called by lv_from_lvid, which is only called from
|
||||||
|
Loading…
Reference in New Issue
Block a user