mirror of
git://sourceware.org/git/lvm2.git
synced 2025-08-04 12:22:00 +03:00
dev-cache: fix mem corruption on refresh context
When lvm2 command works with clvmd and uses locking in wrong way, it may 'leak' certain file descriptors in opened (incorrect) state. dev_cache_exit then destroys memory pool of cached devices, while _open_devices list in dev-io.c was still referencing them if they were still opened. Patch properly calls _close() function to 'self-heal' from this invalid state, but it will report internal error (so execution with abort_on_internal_error causes immediate death). On the normal 'execution', error is only reported, but memory state is corrected, and linked list is not referencing devices from released mempool. For crash see: https://bugzilla.redhat.com/show_bug.cgi?id=1073886
This commit is contained in:
@ -36,7 +36,8 @@ struct dev_filter {
|
||||
*/
|
||||
struct cmd_context;
|
||||
int dev_cache_init(struct cmd_context *cmd);
|
||||
void dev_cache_exit(void);
|
||||
int dev_cache_check_for_open_devices(void);
|
||||
int dev_cache_exit(void);
|
||||
|
||||
/* Trigger(1) or avoid(0) a scan */
|
||||
void dev_cache_scan(int do_scan);
|
||||
|
Reference in New Issue
Block a user