[Devel] [PATCH RHEL7 COMMIT] ploop: fix typo in ploop_pb_get_first_req_from_tree
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Jul 13 13:49:10 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.33.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.33.5
------>
commit b6bd12ecf7c66c26883843d9dc58c0964dc1c0a8
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date: Thu Jul 13 14:49:09 2017 +0400
ploop: fix typo in ploop_pb_get_first_req_from_tree
Due to a typo, local pointer was defined as static leading to a nasty race:
1. Thread A (handling ploopN) initializes that pointer
2. Thread B (handling ploopM) re-initialize the same pointer
3. Thread A proceeds with using the pointer that currently points to
some request belonging to ploopM.
Hence data (ploop requests) leaked from one ploop device to another
leading to list corruption.
https://jira.sw.ru/browse/PSBM-67513
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
drivers/block/ploop/push_backup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ploop/push_backup.c b/drivers/block/ploop/push_backup.c
index ade5fa5..032706e 100644
--- a/drivers/block/ploop/push_backup.c
+++ b/drivers/block/ploop/push_backup.c
@@ -598,7 +598,7 @@ ploop_pb_get_first_req_from_tree(struct pb_set *pbs,
unsigned old_owner)
{
struct rb_root *tree = &pbs->tree;
- static struct ploop_request *p;
+ struct ploop_request *p;
struct rb_node *n = rb_first(tree);
if (!n)
More information about the Devel
mailing list