[Devel] [PATCH rh7] ploop: push_backup: avoid deadlock on PLOOP_PEEK
Maxim Patlasov
mpatlasov at virtuozzo.com
Tue Oct 25 16:29:46 PDT 2016
ioctl handlers for PLOOP_IOC_PUSH_BACKUP_IO, including
ctl.direction = PLOOP_PEEK must not use ploop_quiesce/relax
because ploop_quiesce waits for completion of active requests,
but some of them may be currently blocked on the progress of
vz_backup_client. Deadlock.
Calling ploop_pb_peek() without protection of ploop_quiesce
is safe because it acquires pbd->ppb_lock anyway. The result
of the ioctl must be consistent because incoming bio-s rely
on the state push_backup maps, but they never change them.
Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
drivers/block/ploop/dev.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 921ec8b..a8720db 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4822,9 +4822,7 @@ static int ploop_push_backup_io_peek(struct ploop_device *plo,
{
int rc;
- ploop_quiesce(plo);
rc = ploop_push_backup_io_get(plo, arg, ctl, ploop_pb_peek);
- ploop_relax(plo);
if (rc == -ENOENT) {
ctl->n_extents = 0;
More information about the Devel
mailing list