Commit 898e9af
committed
vsock: fix possible infinite sleep in vsock_connectible_wait_data()
Bugzilla: https://bugzilla.redhat.com/2160028
commit 466a853
Author: Dexuan Cui <decui@microsoft.com>
Date: Mon Oct 31 19:17:06 2022 -0700
vsock: fix possible infinite sleep in vsock_connectible_wait_data()
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: b3f7fd5 ("af_vsock: separate wait data loop")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reported-by: Frédéric Dalleau <frederic.dalleau@docker.com>
Tested-by: Frédéric Dalleau <frederic.dalleau@docker.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>1 parent 41a67ae commit 898e9af
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1905 | 1905 | | |
1906 | 1906 | | |
1907 | 1907 | | |
1908 | | - | |
| 1908 | + | |
1909 | 1909 | | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
1910 | 1913 | | |
1911 | 1914 | | |
1912 | 1915 | | |
| |||
0 commit comments