[Devel] [PATCH RHEL7 COMMIT] ploop: call check_lockout() under ploop->lock
Vasily Averin
vvs at virtuozzo.com
Sun Sep 20 11:55:26 MSK 2020
The commit is pushed to "branch-rh7-3.10.0-1127.18.2.vz7.163.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.18.2.vz7.163.25
------>
commit ee99f225c69823f710c3ddbd363ccfdfd81e682f
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Sun Sep 20 11:55:26 2020 +0300
ploop: call check_lockout() under ploop->lock
Parallel ploop_make_request() may modify lockout tree
via try_merge()->overlap_{forward,backward}(), so
check_lockout() must access to the tree under the lock.
Found in scope of (not a reason of):
https://jira.sw.ru/browse/PSBM-108002
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/dev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index c09cafc..ac4d142 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -2403,10 +2403,13 @@ restart:
}
}
+ spin_lock_irq(&plo->lock);
if (check_lockout(preq)) {
+ spin_unlock_irq(&plo->lock);
__TRACE("l %p %u\n", preq, preq->req_cluster);
return;
}
+ spin_unlock_irq(&plo->lock);
/* push_backup special processing */
if (!test_bit(PLOOP_REQ_PB_LOCKOUT, &preq->state) &&
More information about the Devel
mailing list