Most other users handle this under the pb->lock so let's
make it a bit more consistent.

https://virtuozzo.atlassian.net/browse/VSTOR-152912
Signed-off-by: Andrey Zhadchenko <[email protected]>
---
v2: reworded the commit message, dropped the KCSAN claim

 drivers/md/dm-push-backup.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/dm-push-backup.c b/drivers/md/dm-push-backup.c
index 9a6252f2b21e2..1ae4ccc208ffa 100644
--- a/drivers/md/dm-push-backup.c
+++ b/drivers/md/dm-push-backup.c
@@ -581,7 +581,9 @@ static int pb_message(struct dm_target *ti, unsigned int 
argc, char **argv,
                if (!pb->map)
                        return -EBADF;
 
+               spin_lock_irq(&pb->lock);
                pb->alive = false;
+               spin_unlock_irq(&pb->lock);
                wake_up_interruptible(&pb->waitq); /* pb->alive = false */
        }
 
-- 
2.43.5

_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to