Dongli Zhang 042b2046d0 xen/netfront: stop tx queues during live migration
The tx queues are not stopped during the live migration. As a result, the
ndo_start_xmit() may access netfront_info->queues which is freed by
talk_to_netback()->xennet_destroy_queues().

This patch is to netif_device_detach() at the beginning of xen-netfront
resuming, and netif_device_attach() at the end of resuming.

     CPU A                                CPU B

 talk_to_netback()
 -> if (info->queues)
        xennet_destroy_queues(info);
    to free netfront_info->queues

                                        xennet_start_xmit()
                                        to access netfront_info->queues

  -> err = xennet_create_queues(info, &num_queues);

The idea is borrowed from virtio-net.

Cc: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-25 16:13:12 +01:00
..
2021-10-17 17:17:28 -10:00
2021-09-01 08:44:42 -07:00
2021-10-17 19:25:20 -10:00
2021-10-17 17:17:28 -10:00
2021-09-07 12:38:59 -07:00
2021-09-09 11:48:27 -07:00
2021-09-09 11:39:57 -07:00
2021-09-08 11:50:26 -07:00
2021-09-09 11:07:47 -07:00
2021-10-17 17:30:49 -10:00
2021-09-15 17:18:56 -07:00
2021-10-17 17:10:00 -10:00
2021-10-08 11:57:54 -07:00
2021-09-01 08:44:42 -07:00
2021-09-07 12:38:59 -07:00
2021-10-08 11:57:54 -07:00
2021-10-14 09:07:14 -06:00
2021-10-16 09:00:46 -07:00
2021-09-20 12:43:34 +01:00
2021-09-01 15:25:28 -07:00
2021-10-01 14:45:23 -07:00
2021-09-01 08:44:42 -07:00
2021-10-17 17:17:28 -10:00
2021-09-01 10:29:29 -07:00
2021-10-17 17:06:31 -10:00
2021-10-15 15:04:02 +02:00
2021-10-17 18:17:19 -10:00
2021-10-08 12:55:23 -07:00
2021-08-14 15:54:09 -06:00