[Devel] [PATCH RHEL10 COMMIT] vhost/vsock: always initialize vhost_vsock->cpr_paused field
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Jun 29 18:42:28 MSK 2026
The commit is pushed to "branch-rh10-6.12.0-211.16.1.12.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.16.1.12.5.vz10
------>
commit 3a446c8a80bd368979b455434514adb8eae8b190
Author: Andrey Drobyshev <andrey.drobyshev at virtuozzo.com>
Date: Thu Jun 4 18:46:12 2026 +0300
vhost/vsock: always initialize vhost_vsock->cpr_paused field
The fields isn't initialized when /dev/vhost-vsock is opened, until
VHOST_VSOCK_SET_RUNNING ioctl is called.
kvmalloc(..., GFP_KERNEL | __GFP_RETRY_MAYFAIL) does not zero memory.
Les't make sure the field is always initialized to false on device open.
Fixes: 965dba34b2a2 ("vhost/vsock: suppress EHOSTUNREACH fast-fail during CPR pause")
https://virtuozzo.atlassian.net/browse/VSTOR-101116
Reviewed-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Signed-off-by: Andrey Drobyshev <andrey.drobyshev at virtuozzo.com>
Feature: vhost-vsock: VHOST_RESET_OWNER ioctl
---
drivers/vhost/vsock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c
index d4c3f94308dbc..67cedf55cd2a3 100644
--- a/drivers/vhost/vsock.c
+++ b/drivers/vhost/vsock.c
@@ -725,6 +725,7 @@ static int vhost_vsock_dev_open(struct inode *inode, struct file *file)
vsock->guest_cid = 0; /* no CID assigned yet */
vsock->seqpacket_allow = false;
+ vsock->cpr_paused = false;
atomic_set(&vsock->queued_replies, 0);
More information about the Devel
mailing list