[Devel] [PATCH RHEL7 COMMIT] fs/fuse kio: fix sreq and msg leak in prepare_map_flush_ireq()

Konstantin Khorenko khorenko at virtuozzo.com
Tue Dec 4 16:17:11 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-862.20.2.vz7.73.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.20.2.vz7.73.17
------>
commit 9e9fe84896d4091e11a7cfda50fe6e224762402b
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date:   Tue Dec 4 16:17:09 2018 +0300

    fs/fuse kio: fix sreq and msg leak in prepare_map_flush_ireq()
    
    https://pmc.acronis.com/browse/VSTOR-18475
    
    Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_map.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/fuse/kio/pcs/pcs_map.c b/fs/fuse/kio/pcs/pcs_map.c
index 4bd18c5224ab..1e700dff2043 100644
--- a/fs/fuse/kio/pcs/pcs_map.c
+++ b/fs/fuse/kio/pcs/pcs_map.c
@@ -3016,6 +3016,8 @@ static int prepare_map_flush_ireq(struct pcs_map_entry *m,
 	cslist_put(cslist);
 	if (!valid_for_flush(m, timer_sync) || m->cs_list != cslist) {
 		spin_unlock(&m->lock);
+		pcs_free_msg(msg);
+		ireq_destroy(sreq);
 		return 0;
 	}
 	prepare_map_flush_msg(m, sreq, msg);



More information about the Devel mailing list