From: Dexuan Cui <decui@microsoft.com> Date: 2022-11-01 02:17:45
Patch 1 removes the unused 'wait' variable.
Patch 2 fixes an infinite sleep issue reported by a hv_sock user.
Made v2 to address Stefano's comments.
Please see each patch's header for changes in v2.
Dexuan Cui (2):
vsock: remove the unused 'wait' in vsock_connectible_recvmsg()
vsock: fix possible infinite sleep in vsock_connectible_wait_data()
net/vmw_vsock/af_vsock.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--
2.25.1
From: Dexuan Cui <decui@microsoft.com> Date: 2022-11-01 02:17:53
Currently vsock_connectible_has_data() may miss a wakeup operation
between vsock_connectible_has_data() == 0 and the prepare_to_wait().
Fix the race by adding the process to the wait queue before checking
vsock_connectible_has_data().
Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
---
Changes in v2 (Thanks Stefano!):
Fixed a typo in the commit message.
Removed the unnecessary finish_wait() at the end of the loop.
net/vmw_vsock/af_vsock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
On Mon, Oct 31, 2022 at 07:17:06PM -0700, Dexuan Cui wrote:
Currently vsock_connectible_has_data() may miss a wakeup operation
between vsock_connectible_has_data() == 0 and the prepare_to_wait().
Fix the race by adding the process to the wait queue before checking
vsock_connectible_has_data().
Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
---
Changes in v2 (Thanks Stefano!):
Fixed a typo in the commit message.
Removed the unnecessary finish_wait() at the end of the loop.
On Wed, Nov 02, 2022 at 10:31:37AM +0100, Stefano Garzarella wrote:
On Mon, Oct 31, 2022 at 07:17:06PM -0700, Dexuan Cui wrote:
quoted
Currently vsock_connectible_has_data() may miss a wakeup operation
between vsock_connectible_has_data() == 0 and the prepare_to_wait().
Fix the race by adding the process to the wait queue before checking
vsock_connectible_has_data().
Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
---
Changes in v2 (Thanks Stefano!):
Fixed a typo in the commit message.
Removed the unnecessary finish_wait() at the end of the loop.
Hi Dexuan, Stefano,
Tested-by: Frédéric Dalleau <redacted>
Regards,
Frédéric
On Wed, Nov 2, 2022 at 10:42 AM Stefano Garzarella [off-list ref] wrote:
On Wed, Nov 02, 2022 at 10:31:37AM +0100, Stefano Garzarella wrote:
quoted
On Mon, Oct 31, 2022 at 07:17:06PM -0700, Dexuan Cui wrote:
quoted
Currently vsock_connectible_has_data() may miss a wakeup operation
between vsock_connectible_has_data() == 0 and the prepare_to_wait().
Fix the race by adding the process to the wait queue before checking
vsock_connectible_has_data().
Fixes: b3f7fd54881b ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
---
Changes in v2 (Thanks Stefano!):
Fixed a typo in the commit message.
Removed the unnecessary finish_wait() at the end of the loop.
Hello:
This series was applied to netdev/net.git (master)
by Paolo Abeni [off-list ref]:
On Mon, 31 Oct 2022 19:17:04 -0700 you wrote:
Patch 1 removes the unused 'wait' variable.
Patch 2 fixes an infinite sleep issue reported by a hv_sock user.
Made v2 to address Stefano's comments.
Please see each patch's header for changes in v2.
Dexuan Cui (2):
vsock: remove the unused 'wait' in vsock_connectible_recvmsg()
vsock: fix possible infinite sleep in vsock_connectible_wait_data()
[...]