[Devel] [PATCH RHEL8 COMMIT] ploop: Cancel backup timer before target destruction

Konstantin Khorenko khorenko at virtuozzo.com
Fri Oct 18 14:36:58 MSK 2019


The commit is pushed to "branch-rh8-4.18.0-80.1.2.vz8.2.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-80.1.2.vz8.2.2
------>
commit 3dfab2aa292da8c101167ba2c3165ea4211796da
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Oct 18 14:36:56 2019 +0300

    ploop: Cancel backup timer before target destruction
    
    ... and also queue delayed bios back. Otherwise, it fires
    after memory is freed.
    
    Fixes: 398e0c85e871 ("dm: Interpreter of ploop1 format (ploop driver)")
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-target.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-target.c b/drivers/md/dm-ploop-target.c
index 69c215e1bc66..a5abcac11c14 100644
--- a/drivers/md/dm-ploop-target.c
+++ b/drivers/md/dm-ploop-target.c
@@ -46,8 +46,10 @@ static void ploop_destroy(struct ploop *ploop)
 {
 	int i;
 
-	if (ploop->pb)
+	if (ploop->pb) {
+		cleanup_backup(ploop);
 		ploop_free_pb(ploop->pb);
+	}
 	if (ploop->wq) {
 		ploop_flush_workqueue(ploop);
 		destroy_workqueue(ploop->wq);



More information about the Devel mailing list