search for: register_hotcpu_notifier

Displaying 20 results from an estimated 52 matches for "register_hotcpu_notifier".

2013 Oct 28
5
[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...rtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -957,6 +957,10 @@ static void virtscsi_remove(struct virtio_device *vdev) #ifdef CONFIG_PM static int virtscsi_freeze(struct virtio_device *vdev) { + struct Scsi_Host *sh = virtio_scsi_host(vdev); + struct virtio_scsi *vscsi = shost_priv(sh); + + unregister_hotcpu_notifier(&vscsi->nb); virtscsi_remove_vqs(vdev); return 0; } @@ -965,8 +969,17 @@ static int virtscsi_restore(struct virtio_device *vdev) { struct Scsi_Host *sh = virtio_scsi_host(vdev); struct virtio_scsi *vscsi = shost_priv(sh); + int err; + + err = virtscsi_init(vdev, vscsi); + if (err)...
2013 Oct 28
5
[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...rtio_scsi.c +++ b/drivers/scsi/virtio_scsi.c @@ -957,6 +957,10 @@ static void virtscsi_remove(struct virtio_device *vdev) #ifdef CONFIG_PM static int virtscsi_freeze(struct virtio_device *vdev) { + struct Scsi_Host *sh = virtio_scsi_host(vdev); + struct virtio_scsi *vscsi = shost_priv(sh); + + unregister_hotcpu_notifier(&vscsi->nb); virtscsi_remove_vqs(vdev); return 0; } @@ -965,8 +969,17 @@ static int virtscsi_restore(struct virtio_device *vdev) { struct Scsi_Host *sh = virtio_scsi_host(vdev); struct virtio_scsi *vscsi = shost_priv(sh); + int err; + + err = virtscsi_init(vdev, vscsi); + if (err)...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...cpu_hotplug = false; + } + + txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : smp_processor_id(); while (unlikely(txq >= dev->real_num_tx_queues)) @@ -1248,6 +1278,8 @@ static void virtnet_del_vqs(struct virtnet_info *vi) { struct virtio_device *vdev = vi->vdev; + unregister_hotcpu_notifier(&virtnet_cpu_notifier); + virtnet_set_affinity(vi, false); vdev->config->del_vqs(vdev); @@ -1372,6 +1404,11 @@ static int init_vqs(struct virtnet_info *vi) goto err_free; virtnet_set_affinity(vi, true); + + ret = register_hotcpu_notifier(&virtnet_cpu_notifier); + if (ret)...
2012 Dec 26
5
[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug
...cpu_hotplug = false; + } + + txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : smp_processor_id(); while (unlikely(txq >= dev->real_num_tx_queues)) @@ -1248,6 +1278,8 @@ static void virtnet_del_vqs(struct virtnet_info *vi) { struct virtio_device *vdev = vi->vdev; + unregister_hotcpu_notifier(&virtnet_cpu_notifier); + virtnet_set_affinity(vi, false); vdev->config->del_vqs(vdev); @@ -1372,6 +1404,11 @@ static int init_vqs(struct virtnet_info *vi) goto err_free; virtnet_set_affinity(vi, true); + + ret = register_hotcpu_notifier(&virtnet_cpu_notifier); + if (ret)...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...ev); 1925 1926 err = register_netdev(dev); 1927 if (err) { 1928 pr_debug("virtio_net: registering device failed\n"); 1929 goto free_vqs; 1930 } 1931 1932 virtio_device_ready(vdev); 1933 1934 vi->nb.notifier_call = &virtnet_cpu_callback; 1935 err = register_hotcpu_notifier(&vi->nb); 1936 if (err) { 1937 pr_debug("virtio_net: registering cpu notifier failed\n"); 1938 goto free_unregister_netdev; 1939 } 1940 1941 /* Assume link up if device can't report link status, 1942 otherwise get link status from config. */ 1943 if...
2016 Jun 02
1
[PATCH -next 2/2] virtio_net: Read the advised MTU
...ev); 1925 1926 err = register_netdev(dev); 1927 if (err) { 1928 pr_debug("virtio_net: registering device failed\n"); 1929 goto free_vqs; 1930 } 1931 1932 virtio_device_ready(vdev); 1933 1934 vi->nb.notifier_call = &virtnet_cpu_callback; 1935 err = register_hotcpu_notifier(&vi->nb); 1936 if (err) { 1937 pr_debug("virtio_net: registering cpu notifier failed\n"); 1938 goto free_unregister_netdev; 1939 } 1940 1941 /* Assume link up if device can't report link status, 1942 otherwise get link status from config. */ 1943 if...
2013 Dec 17
1
[PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...csi.c +++ b/drivers/scsi/virtio_scsi.c @@ -956,6 +956,10 @@ static void virtscsi_remove(struct virtio_device *vdev) #ifdef CONFIG_PM_SLEEP static int virtscsi_freeze(struct virtio_device *vdev) { + struct Scsi_Host *sh = virtio_scsi_host(vdev); + struct virtio_scsi *vscsi = shost_priv(sh); + + unregister_hotcpu_notifier(&vscsi->nb); virtscsi_remove_vqs(vdev); return 0; } @@ -964,8 +968,17 @@ static int virtscsi_restore(struct virtio_device *vdev) { struct Scsi_Host *sh = virtio_scsi_host(vdev); struct virtio_scsi *vscsi = shost_priv(sh); + int err; + + err = virtscsi_init(vdev, vscsi); + if (err)...
2013 Dec 17
1
[PATCH V2] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...csi.c +++ b/drivers/scsi/virtio_scsi.c @@ -956,6 +956,10 @@ static void virtscsi_remove(struct virtio_device *vdev) #ifdef CONFIG_PM_SLEEP static int virtscsi_freeze(struct virtio_device *vdev) { + struct Scsi_Host *sh = virtio_scsi_host(vdev); + struct virtio_scsi *vscsi = shost_priv(sh); + + unregister_hotcpu_notifier(&vscsi->nb); virtscsi_remove_vqs(vdev); return 0; } @@ -964,8 +968,17 @@ static int virtscsi_restore(struct virtio_device *vdev) { struct Scsi_Host *sh = virtio_scsi_host(vdev); struct virtio_scsi *vscsi = shost_priv(sh); + int err; + + err = virtscsi_init(vdev, vscsi); + if (err)...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...e_nocalls(CPUHP_VIRT_NET_DEAD, + &vi->node_dead); } static void virtnet_get_ringparam(struct net_device *dev, @@ -1879,8 +1908,7 @@ static int virtnet_probe(struct virtio_device *vdev) virtio_device_ready(vdev); - vi->nb.notifier_call = &virtnet_cpu_callback; - err = register_hotcpu_notifier(&vi->nb); + err = virtnet_cpu_notif_add(vi); if (err) { pr_debug("virtio_net: registering cpu notifier failed\n"); goto free_unregister_netdev; @@ -1934,7 +1962,7 @@ static void virtnet_remove(struct virtio_device *vdev) { struct virtnet_info *vi = vdev->priv; - unr...
2016 Aug 12
0
[PATCH 6/6] net: virtio-net: Convert to hotplug state machine
...e_nocalls(CPUHP_VIRT_NET_DEAD, + &vi->node_dead); } static void virtnet_get_ringparam(struct net_device *dev, @@ -1879,8 +1908,7 @@ static int virtnet_probe(struct virtio_device *vdev) virtio_device_ready(vdev); - vi->nb.notifier_call = &virtnet_cpu_callback; - err = register_hotcpu_notifier(&vi->nb); + err = virtnet_cpu_notif_add(vi); if (err) { pr_debug("virtio_net: registering cpu notifier failed\n"); goto free_unregister_netdev; @@ -1934,7 +1962,7 @@ static void virtnet_remove(struct virtio_device *vdev) { struct virtnet_info *vi = vdev->priv; - unr...
2013 Oct 29
3
[PATCH net] virtio-net: correctly handle cpu hotplug notifier during resuming
...136,8 +1131,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, break; } -done: - mutex_unlock(&vi->config_lock); return NOTIFY_OK; } @@ -1699,6 +1692,8 @@ static int virtnet_freeze(struct virtio_device *vdev) struct virtnet_info *vi = vdev->priv; int i; + unregister_hotcpu_notifier(&vi->nb); + /* Prevent config work handler from accessing the device */ mutex_lock(&vi->config_lock); vi->config_enable = false; @@ -1747,6 +1742,10 @@ static int virtnet_restore(struct virtio_device *vdev) virtnet_set_queues(vi, vi->curr_queue_pairs); rtnl_unlock();...
2013 Oct 29
3
[PATCH net] virtio-net: correctly handle cpu hotplug notifier during resuming
...136,8 +1131,6 @@ static int virtnet_cpu_callback(struct notifier_block *nfb, break; } -done: - mutex_unlock(&vi->config_lock); return NOTIFY_OK; } @@ -1699,6 +1692,8 @@ static int virtnet_freeze(struct virtio_device *vdev) struct virtnet_info *vi = vdev->priv; int i; + unregister_hotcpu_notifier(&vi->nb); + /* Prevent config work handler from accessing the device */ mutex_lock(&vi->config_lock); vi->config_enable = false; @@ -1747,6 +1742,10 @@ static int virtnet_restore(struct virtio_device *vdev) virtnet_set_queues(vi, vi->curr_queue_pairs); rtnl_unlock();...
2013 Dec 12
0
[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...si.c > @@ -957,6 +957,10 @@ static void virtscsi_remove(struct virtio_device *vdev) > #ifdef CONFIG_PM > static int virtscsi_freeze(struct virtio_device *vdev) > { > + struct Scsi_Host *sh = virtio_scsi_host(vdev); > + struct virtio_scsi *vscsi = shost_priv(sh); > + > + unregister_hotcpu_notifier(&vscsi->nb); > virtscsi_remove_vqs(vdev); > return 0; > } > @@ -965,8 +969,17 @@ static int virtscsi_restore(struct virtio_device *vdev) > { > struct Scsi_Host *sh = virtio_scsi_host(vdev); > struct virtio_scsi *vscsi = shost_priv(sh); > + int err; > + &g...
2013 Dec 17
1
[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...@@ static void virtscsi_remove(struct virtio_device *vdev) >> #ifdef CONFIG_PM >> static int virtscsi_freeze(struct virtio_device *vdev) >> { >> + struct Scsi_Host *sh = virtio_scsi_host(vdev); >> + struct virtio_scsi *vscsi = shost_priv(sh); >> + >> + unregister_hotcpu_notifier(&vscsi->nb); >> virtscsi_remove_vqs(vdev); >> return 0; >> } >> @@ -965,8 +969,17 @@ static int virtscsi_restore(struct virtio_device *vdev) >> { >> struct Scsi_Host *sh = virtio_scsi_host(vdev); >> struct virtio_scsi *vscsi = shost_priv(sh...
2013 Dec 17
1
[PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze
...@@ static void virtscsi_remove(struct virtio_device *vdev) >> #ifdef CONFIG_PM >> static int virtscsi_freeze(struct virtio_device *vdev) >> { >> + struct Scsi_Host *sh = virtio_scsi_host(vdev); >> + struct virtio_scsi *vscsi = shost_priv(sh); >> + >> + unregister_hotcpu_notifier(&vscsi->nb); >> virtscsi_remove_vqs(vdev); >> return 0; >> } >> @@ -965,8 +969,17 @@ static int virtscsi_restore(struct virtio_device *vdev) >> { >> struct Scsi_Host *sh = virtio_scsi_host(vdev); >> struct virtio_scsi *vscsi = shost_priv(sh...
2016 Jun 02
7
[PATCH -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as described in the proposed VFIO spec addition found at
2016 Jun 02
7
[PATCH -next 0/2] virtio-net: Advised MTU feature
The following series adds the ability for a hypervisor to set an MTU on the guest during feature negotiation phase. This is useful for VM orchestration when, for instance, tunneling is involved and the MTU of the various systems should be homogenous. The first patch adds the feature bit as described in the proposed VFIO spec addition found at
2013 Jan 07
1
[PATCH V2 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
As M.S.T mentioned, set affinity will not work very well when CPU IDs are not consecutive, this can happen with hot unplug. Fix this bug by traversal the online CPUs. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Eric Dumazet <erdnetdev at gmail.com> Cc: virtualization at
2013 Jan 07
1
[PATCH V2 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive
As M.S.T mentioned, set affinity will not work very well when CPU IDs are not consecutive, this can happen with hot unplug. Fix this bug by traversal the online CPUs. Cc: Rusty Russell <rusty at rustcorp.com.au> Cc: "Michael S. Tsirkin" <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Eric Dumazet <erdnetdev at gmail.com> Cc: virtualization at
2013 Oct 23
2
[virtio-net] BUG: sleeping function called from invalid context at kernel/mutex.c:616
...block *nfb, > break; > } > > -done: > - mutex_unlock(&vi->config_lock); > return NOTIFY_OK; > } > > @@ -1699,6 +1692,8 @@ static int virtnet_freeze(struct virtio_device *vdev) > struct virtnet_info *vi = vdev->priv; > int i; > > + unregister_hotcpu_notifier(&vi->nb); > + > /* Prevent config work handler from accessing the device */ > mutex_lock(&vi->config_lock); > vi->config_enable = false; > @@ -1747,6 +1742,10 @@ static int virtnet_restore(struct virtio_device *vdev) > virtnet_set_queues(vi, vi->curr_qu...