Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
An ipvlan bug fix in 'net' conflicted with the abstraction away of the IPV6 specific support in 'net-next'. Similarly, a bug fix for mlx5 in 'net' conflicted with the flow action conversion in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -75,6 +75,9 @@ static u32 virtio_transport_get_local_cid(void)
|
||||
{
|
||||
struct virtio_vsock *vsock = virtio_vsock_get();
|
||||
|
||||
if (!vsock)
|
||||
return VMADDR_CID_ANY;
|
||||
|
||||
return vsock->guest_cid;
|
||||
}
|
||||
|
||||
@@ -584,10 +587,6 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
|
||||
|
||||
virtio_vsock_update_guest_cid(vsock);
|
||||
|
||||
ret = vsock_core_init(&virtio_transport.transport);
|
||||
if (ret < 0)
|
||||
goto out_vqs;
|
||||
|
||||
vsock->rx_buf_nr = 0;
|
||||
vsock->rx_buf_max_nr = 0;
|
||||
atomic_set(&vsock->queued_replies, 0);
|
||||
@@ -618,8 +617,6 @@ static int virtio_vsock_probe(struct virtio_device *vdev)
|
||||
mutex_unlock(&the_virtio_vsock_mutex);
|
||||
return 0;
|
||||
|
||||
out_vqs:
|
||||
vsock->vdev->config->del_vqs(vsock->vdev);
|
||||
out:
|
||||
kfree(vsock);
|
||||
mutex_unlock(&the_virtio_vsock_mutex);
|
||||
@@ -637,6 +634,9 @@ static void virtio_vsock_remove(struct virtio_device *vdev)
|
||||
flush_work(&vsock->event_work);
|
||||
flush_work(&vsock->send_pkt_work);
|
||||
|
||||
/* Reset all connected sockets when the device disappear */
|
||||
vsock_for_each_connected_socket(virtio_vsock_reset_sock);
|
||||
|
||||
vdev->config->reset(vdev);
|
||||
|
||||
mutex_lock(&vsock->rx_lock);
|
||||
@@ -669,7 +669,6 @@ static void virtio_vsock_remove(struct virtio_device *vdev)
|
||||
|
||||
mutex_lock(&the_virtio_vsock_mutex);
|
||||
the_virtio_vsock = NULL;
|
||||
vsock_core_exit();
|
||||
mutex_unlock(&the_virtio_vsock_mutex);
|
||||
|
||||
vdev->config->del_vqs(vdev);
|
||||
@@ -702,14 +701,28 @@ static int __init virtio_vsock_init(void)
|
||||
virtio_vsock_workqueue = alloc_workqueue("virtio_vsock", 0, 0);
|
||||
if (!virtio_vsock_workqueue)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = register_virtio_driver(&virtio_vsock_driver);
|
||||
if (ret)
|
||||
destroy_workqueue(virtio_vsock_workqueue);
|
||||
goto out_wq;
|
||||
|
||||
ret = vsock_core_init(&virtio_transport.transport);
|
||||
if (ret)
|
||||
goto out_vdr;
|
||||
|
||||
return 0;
|
||||
|
||||
out_vdr:
|
||||
unregister_virtio_driver(&virtio_vsock_driver);
|
||||
out_wq:
|
||||
destroy_workqueue(virtio_vsock_workqueue);
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static void __exit virtio_vsock_exit(void)
|
||||
{
|
||||
vsock_core_exit();
|
||||
unregister_virtio_driver(&virtio_vsock_driver);
|
||||
destroy_workqueue(virtio_vsock_workqueue);
|
||||
}
|
||||
|
Reference in New Issue
Block a user