mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
Revert "BACKPORT: vsock: each transport cycles only on its own sockets"
This reverts commitc22d8a19e9. It needs to be added _after_ 5.15.13 is merged, not before, otherwise the revert and merge break. Fixes:c22d8a19e9("BACKPORT: vsock: each transport cycles only on its own sockets") Signed-off-by: Jiyong Park <jiyong@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I513425a7346540c5b6a90e9e793a7fadf71b0a1d
This commit is contained in:
@@ -726,10 +726,6 @@ static void vhost_vsock_reset_orphans(struct sock *sk)
|
||||
* executing.
|
||||
*/
|
||||
|
||||
/* Only handle our own sockets */
|
||||
if (vsk->transport != &vhost_transport.transport)
|
||||
return;
|
||||
|
||||
/* If the peer is still valid, no need to reset connection */
|
||||
if (vhost_vsock_get(vsk->remote_addr.svm_cid))
|
||||
return;
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
static struct workqueue_struct *virtio_vsock_workqueue;
|
||||
static struct virtio_vsock __rcu *the_virtio_vsock;
|
||||
static DEFINE_MUTEX(the_virtio_vsock_mutex); /* protects the_virtio_vsock */
|
||||
static struct virtio_transport virtio_transport; /* forward declaration */
|
||||
|
||||
struct virtio_vsock {
|
||||
struct virtio_device *vdev;
|
||||
@@ -358,17 +357,11 @@ static void virtio_vsock_event_fill(struct virtio_vsock *vsock)
|
||||
|
||||
static void virtio_vsock_reset_sock(struct sock *sk)
|
||||
{
|
||||
struct vsock_sock *vsk = vsock_sk(sk);
|
||||
|
||||
/* vmci_transport.c doesn't take sk_lock here either. At least we're
|
||||
* under vsock_table_lock so the sock cannot disappear while we're
|
||||
* executing.
|
||||
*/
|
||||
|
||||
/* Only handle our own sockets */
|
||||
if (vsk->transport != &virtio_transport.transport)
|
||||
return;
|
||||
|
||||
sk->sk_state = TCP_CLOSE;
|
||||
sk->sk_err = ECONNRESET;
|
||||
sk_error_report(sk);
|
||||
|
||||
@@ -75,8 +75,6 @@ static u32 vmci_transport_qp_resumed_sub_id = VMCI_INVALID_ID;
|
||||
|
||||
static int PROTOCOL_OVERRIDE = -1;
|
||||
|
||||
static struct vsock_transport vmci_transport; /* forward declaration */
|
||||
|
||||
/* Helper function to convert from a VMCI error code to a VSock error code. */
|
||||
|
||||
static s32 vmci_transport_error_to_vsock_error(s32 vmci_error)
|
||||
@@ -805,11 +803,6 @@ static void vmci_transport_handle_detach(struct sock *sk)
|
||||
struct vsock_sock *vsk;
|
||||
|
||||
vsk = vsock_sk(sk);
|
||||
|
||||
/* Only handle our own sockets */
|
||||
if (vsk->transport != &vmci_transport)
|
||||
return;
|
||||
|
||||
if (!vmci_handle_is_invalid(vmci_trans(vsk)->qp_handle)) {
|
||||
sock_set_flag(sk, SOCK_DONE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user