diff options
author | Longpeng(Mike) <[email protected]> | 2021-06-21 14:26:01 +0800 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-06-21 14:43:28 -0700 |
commit | c7ff9cff70601ea19245d997bb977344663434c7 (patch) | |
tree | 0b34808f8062fc2f68f75637e98d98ab3250c691 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | b90788459cd6d140171b046f0b37fad341ade0a3 (diff) |
vsock: notify server to shutdown when client has pending signal
The client's sk_state will be set to TCP_ESTABLISHED if the server
replay the client's connect request.
However, if the client has pending signal, its sk_state will be set
to TCP_CLOSE without notify the server, so the server will hold the
corrupt connection.
client server
1. sk_state=TCP_SYN_SENT |
2. call ->connect() |
3. wait reply |
| 4. sk_state=TCP_ESTABLISHED
| 5. insert to connected list
| 6. reply to the client
7. sk_state=TCP_ESTABLISHED |
8. insert to connected list |
9. *signal pending* <--------------------- the user kill client
10. sk_state=TCP_CLOSE |
client is exiting... |
11. call ->release() |
virtio_transport_close
if (!(sk->sk_state == TCP_ESTABLISHED ||
sk->sk_state == TCP_CLOSING))
return true; *return at here, the server cannot notice the connection is corrupt*
So the client should notify the peer in this case.
Cc: David S. Miller <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Jorgen Hansen <[email protected]>
Cc: Norbert Slusarek <[email protected]>
Cc: Andra Paraschiv <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: David Brazdil <[email protected]>
Cc: Alexander Popov <[email protected]>
Suggested-by: Stefano Garzarella <[email protected]>
Link: https://lkml.org/lkml/2021/5/17/418
Signed-off-by: lixianming <[email protected]>
Signed-off-by: Longpeng(Mike) <[email protected]>
Reviewed-by: Stefano Garzarella <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions