[Devel] [PATCH RHEL7 COMMIT] ploop: Fix leak of discard kreq
Vasily Averin
vvs at virtuozzo.com
Tue May 18 08:15:27 MSK 2021
The commit is pushed to "branch-rh7-3.10.0-1160.25.1.vz7.180.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.25.1.vz7.180.3
------>
commit dfb578614c416c40d78446cc2661d1c318d33caf
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Tue May 18 08:15:27 2021 +0300
ploop: Fix leak of discard kreq
In case of kaio is async, kreq is freed from endio.
In case of sync kreq, we should free it ourselves.
https://jira.sw.ru/browse/PSBM-129412
Fixes: commit d2709bb9ac22 "ploop: Enable 1M holes with zeroing indexes for io_kaio"
Reported-by: Alexey Bilan <alexey.bilan at virtuozzo.com>
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/io_kaio.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 44df242d8128..bc245ea3a5b3 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -191,6 +191,7 @@ static int kaio_kernel_submit(struct file *file, struct kaio_req *kreq,
pos, count);
if (err == 0) {
kaio_complete_io_request(kreq->preq);
+ kfree(kreq);
/* Otherwise, caller decrements counter */
}
return err;
More information about the Devel
mailing list