search for: device_unregist

Displaying 20 results from an estimated 216 matches for "device_unregist".

Did you mean: device_unregister
2012 Nov 08
3
[PATCH] virtio: Don't access index after unregister.
Virtio wants to release used indices after the corresponding virtio device has been unregistered. However, virtio does not hold an extra reference, giving up its last reference with device_unregister(), making accessing dev->index afterwards invalid. I actually saw problems when testing my (not-yet-merged) virtio-ccw code: - device_add virtio-net,id=xxx -> creates device virtio<n> with n>0 - device_del xxx -> deletes virtio<n>, but calls ida_simple_remove with an...
2012 Nov 08
3
[PATCH] virtio: Don't access index after unregister.
Virtio wants to release used indices after the corresponding virtio device has been unregistered. However, virtio does not hold an extra reference, giving up its last reference with device_unregister(), making accessing dev->index afterwards invalid. I actually saw problems when testing my (not-yet-merged) virtio-ccw code: - device_add virtio-net,id=xxx -> creates device virtio<n> with n>0 - device_del xxx -> deletes virtio<n>, but calls ida_simple_remove with an...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...vmbus_shutdown(struct device *device); @@ -199,6 +198,59 @@ static int vmbus_match(struct device *device, struct device_driver *driver) return match; } + +/* + * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe() + * + * We need a callback because we cannot invoked device_unregister() inside + * vmbus_probe() since vmbus_probe() may be invoked inside device_register() + * i.e. we cannot call device_unregister() inside device_register() + */ +static void vmbus_probe_failed_cb(struct work_struct *context) +{ + struct hv_device *device_ctx = (struct hv_device *)context; + + /*...
2011 Mar 10
0
[PATCH 16/21] Staging: hv: Get rid of the forward declaration for vmbus_probe
...vmbus_shutdown(struct device *device); @@ -199,6 +198,59 @@ static int vmbus_match(struct device *device, struct device_driver *driver) return match; } + +/* + * vmbus_probe_failed_cb - Callback when a driver probe failed in vmbus_probe() + * + * We need a callback because we cannot invoked device_unregister() inside + * vmbus_probe() since vmbus_probe() may be invoked inside device_register() + * i.e. we cannot call device_unregister() inside device_register() + */ +static void vmbus_probe_failed_cb(struct work_struct *context) +{ + struct hv_device *device_ctx = (struct hv_device *)context; + + /*...
2012 Sep 03
1
[PATCH] virtio: Don't access device data after unregistration.
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. Use device_del() and put_device() instead of device_unregister(), and access device data before calling put_device(). Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> cc: Guzman Lugo, Fernadndo <fernando.lugo at ti.com> cc: Michael S. Tsirkin <mst at redhat.com> cc: virtualization at lists.linux-foundation.org cc: Ohad B...
2012 Sep 03
1
[PATCH] virtio: Don't access device data after unregistration.
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> Fix panic in virtio.c when CONFIG_DEBUG_SLAB is set. Use device_del() and put_device() instead of device_unregister(), and access device data before calling put_device(). Signed-off-by: Sjur Br?ndeland <sjur.brandeland at stericsson.com> cc: Guzman Lugo, Fernadndo <fernando.lugo at ti.com> cc: Michael S. Tsirkin <mst at redhat.com> cc: virtualization at lists.linux-foundation.org cc: Ohad B...
2023 Apr 13
1
[PATCH net-next V2 0/2] virtio-net: don't busy poll for cvq command
...se interruptible > sleep but it doesn't work for a general workqueue. > > Please review. Thanks for working on this. My DPDK VDUSE RFC missed to set the interrupt, as Xuan Zhou highlighted it makes the vdpa dev add/del commands to freeze: [<0>] device_del+0x37/0x3d0 [<0>] device_unregister+0x13/0x60 [<0>] unregister_virtio_device+0x11/0x20 [<0>] device_release_driver_internal+0x193/0x200 [<0>] bus_remove_device+0xbf/0x130 [<0>] device_del+0x174/0x3d0 [<0>] device_unregister+0x13/0x60 [<0>] vdpa_nl_cmd_dev_del_set_doit+0x66/0xe0 [vdpa] [<0>]...
2015 Jan 04
2
[PATCH 2/2] virtio: don't free memory until the underlying struct device has been released
On Fri, Jan 02, 2015 at 02:47:40PM -0500, Sasha Levin wrote: > When releasing a virtio device, We can't free a struct virtio_device until the > underlying struct device has been released, which might not happen immediately > on device_unregister() even if that was the device's last reference. > > Instead, free the memory only once we know the device is gone in the release > callback. > > Signed-off-by: Sasha Levin <sasha.levin at oracle.com> Isn't this an old bug: do we need to copy stable on a fix? What...
2015 Jan 04
2
[PATCH 2/2] virtio: don't free memory until the underlying struct device has been released
On Fri, Jan 02, 2015 at 02:47:40PM -0500, Sasha Levin wrote: > When releasing a virtio device, We can't free a struct virtio_device until the > underlying struct device has been released, which might not happen immediately > on device_unregister() even if that was the device's last reference. > > Instead, free the memory only once we know the device is gone in the release > callback. > > Signed-off-by: Sasha Levin <sasha.levin at oracle.com> Isn't this an old bug: do we need to copy stable on a fix? What...
2013 Dec 17
2
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
...] del_gendisk at 3f8f5c #7 [1e2036c8] virtblk_remove at 45e60e #8 [1e203700] virtio_dev_remove at 42d72e #9 [1e203738] __device_release_driver at 44f0b0 #10 [1e203760] device_release_driver at 44f16c #11 [1e203788] bus_remove_device at 44ea92 #12 [1e2037b8] device_del at 44bb40 #13 [1e2037f0] device_unregister at 44bbfa #14 [1e203810] unregister_virtio_device at 42d9e6 #15 [1e203830] virtio_ccw_remove at 53b834 #16 [1e203850] ccw_device_remove at 4c5bf6 #17 [1e2038d8] __device_release_driver at 44f0b0 #18 [1e203900] device_release_driver at 44f16c #19 [1e203928] bus_remove_device at 44ea92 #20 [1e20395...
2013 Dec 17
2
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
...] del_gendisk at 3f8f5c #7 [1e2036c8] virtblk_remove at 45e60e #8 [1e203700] virtio_dev_remove at 42d72e #9 [1e203738] __device_release_driver at 44f0b0 #10 [1e203760] device_release_driver at 44f16c #11 [1e203788] bus_remove_device at 44ea92 #12 [1e2037b8] device_del at 44bb40 #13 [1e2037f0] device_unregister at 44bbfa #14 [1e203810] unregister_virtio_device at 42d9e6 #15 [1e203830] virtio_ccw_remove at 53b834 #16 [1e203850] ccw_device_remove at 4c5bf6 #17 [1e2038d8] __device_release_driver at 44f0b0 #18 [1e203900] device_release_driver at 44f16c #19 [1e203928] bus_remove_device at 44ea92 #20 [1e20395...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...07ea858>] virtcons_remove+0xb0/0xfc [<807b6734>] virtio_dev_remove+0x58/0xc0 [<807f918c>] __device_release_driver+0xac/0x134 [<807f924c>] device_release_driver+0x38/0x50 [<807f7edc>] bus_remove_device+0xfc/0x130 [<807f4b74>] device_del+0x17c/0x21c [<807f4c38>] device_unregister+0x24/0x38 [<807b6b50>] unregister_virtio_device+0x28/0x44 Fix this by restructuring the loops to allow the locks to only be taken where it is necessary to protect the vqs, and release it while the buffer is being freed. Fixes: c6017e793b93 ("virtio: console: add locks around buffer r...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...07ea858>] virtcons_remove+0xb0/0xfc [<807b6734>] virtio_dev_remove+0x58/0xc0 [<807f918c>] __device_release_driver+0xac/0x134 [<807f924c>] device_release_driver+0x38/0x50 [<807f7edc>] bus_remove_device+0xfc/0x130 [<807f4b74>] device_del+0x17c/0x21c [<807f4c38>] device_unregister+0x24/0x38 [<807b6b50>] unregister_virtio_device+0x28/0x44 Fix this by restructuring the loops to allow the locks to only be taken where it is necessary to protect the vqs, and release it while the buffer is being freed. Fixes: c6017e793b93 ("virtio: console: add locks around buffer r...
2014 Jan 28
2
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
...668] del_gendisk at 408a4c #10 [163f76c0] virtblk_remove at 46f81e #11 [163f76f8] virtio_dev_remove at 43d302 #12 [163f7730] __device_release_driver at 4604c4 #13 [163f7758] device_release_driver at 46057c #14 [163f7780] bus_remove_device at 45ff74 #15 [163f77b0] device_del at 45cf54 #16 [163f77e8] device_unregister at 45d00e #17 [163f7808] unregister_virtio_device at 43d5ba #18 [163f7828] virtio_ccw_remove at 55156c #19 [163f7850] ccw_device_remove at 4d7e22 #20 [163f78d8] __device_release_driver at 4604c4 #21 [163f7900] device_release_driver at 46057c #22 [163f7928] bus_remove_device at 45ff74 #23 [163f795...
2014 Jan 28
2
[PATCH v4 RFC 0/3] virtio: add 'device_lost' to virtio_device
...668] del_gendisk at 408a4c #10 [163f76c0] virtblk_remove at 46f81e #11 [163f76f8] virtio_dev_remove at 43d302 #12 [163f7730] __device_release_driver at 4604c4 #13 [163f7758] device_release_driver at 46057c #14 [163f7780] bus_remove_device at 45ff74 #15 [163f77b0] device_del at 45cf54 #16 [163f77e8] device_unregister at 45d00e #17 [163f7808] unregister_virtio_device at 43d5ba #18 [163f7828] virtio_ccw_remove at 55156c #19 [163f7850] ccw_device_remove at 4d7e22 #20 [163f78d8] __device_release_driver at 4604c4 #21 [163f7900] device_release_driver at 46057c #22 [163f7928] bus_remove_device at 45ff74 #23 [163f795...
2009 Jul 07
0
[PATCH] virtio-pci: correctly unregister root device on error
If pci_register_driver() fails we're incorrectly unregistering the root device with device_unregister() rather than root_device_unregister(). Reported-by: Don Zickus <dzickus at redhat.com> Signed-off-by: Mark McLoughlin <markmc at redhat.com> --- drivers/virtio/virtio_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drive...
2011 Apr 05
1
[PATCH] virtio: decrement dev_index when device is unregistered
...edhat.com> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index efb35aa..67fe71d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(register_virtio_device); void unregister_virtio_device(struct virtio_device *dev) { device_unregister(&dev->dev); + dev_index--; } EXPORT_SYMBOL_GPL(unregister_virtio_device); -- Umeya, Takuma Technical Account Manager Red Hat GSS APAC +81.3.5798.8584 (direct) tumeya at redhat.com
2009 Jul 07
0
[PATCH] virtio-pci: correctly unregister root device on error
If pci_register_driver() fails we're incorrectly unregistering the root device with device_unregister() rather than root_device_unregister(). Reported-by: Don Zickus <dzickus at redhat.com> Signed-off-by: Mark McLoughlin <markmc at redhat.com> --- drivers/virtio/virtio_pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drive...
2011 Apr 05
1
[PATCH] virtio: decrement dev_index when device is unregistered
...edhat.com> diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index efb35aa..67fe71d 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c @@ -216,6 +216,7 @@ EXPORT_SYMBOL_GPL(register_virtio_device); void unregister_virtio_device(struct virtio_device *dev) { device_unregister(&dev->dev); + dev_index--; } EXPORT_SYMBOL_GPL(unregister_virtio_device); -- Umeya, Takuma Technical Account Manager Red Hat GSS APAC +81.3.5798.8584 (direct) tumeya at redhat.com
2013 Jul 31
3
[PATCH] virtio-scsi: Fix virtqueue affinity setup
...b2>] virtio_dev_remove+0x22/0x70 [<ffffffff8167ca49>] __device_release_driver+0x69/0xd0 [<ffffffff8167cb9d>] device_release_driver+0x2d/0x40 [<ffffffff8167bb96>] bus_remove_device+0x116/0x150 [<ffffffff81679936>] device_del+0x126/0x1e0 [<ffffffff81679a06>] device_unregister+0x16/0x30 [<ffffffff814cb889>] unregister_virtio_device+0x19/0x30 [<ffffffff814cdad6>] virtio_pci_remove+0x36/0x80 [<ffffffff81464ae7>] pci_device_remove+0x37/0x70 [<ffffffff8167ca49>] __device_release_driver+0x69/0xd0 [<ffffffff8167cb9d>] device_release_dr...