search for: device_destroy

Displaying 20 results from an estimated 102 matches for "device_destroy".

2005 Sep 13
1
[RESEND] [PATCH] Call dominfo.device_delete instead of non-existant dominfo.device_destroy
This is a resend on the patch from late last week as I haven''t seen it in the changelog yet. Comments welcomed if there is an issue with the patch. -Sean -- __________________________________________________________________ Sean Dague Mid-Hudson Valley sean at dague dot net Linux Users Group http://dague.net
2005 Sep 09
0
[PATCH] Call dominfo.device_delete instead of non-existant dominfo.device_destroy
...xend/XendDomain.py --- a/tools/python/xen/xend/XendDomain.py Fri Sep 9 18:36:48 2005 +++ b/tools/python/xen/xend/XendDomain.py Fri Sep 9 14:46:01 2005 @@ -667,7 +667,7 @@ @param type: device type """ dominfo = self.domain_lookup(id) - val = dominfo.device_destroy(type, devid) + val = dominfo.device_delete(type, devid) dominfo.exportToDB() return val -- __________________________________________________________________ Sean Dague Mid-Hudson Valley sean at dague dot net...
2013 Jul 19
2
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) > > port = container_of(kref, struct port, kref); > > - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); > - device_destroy(pdrvdata.class, port->dev->devt); > - cdev_del(port->cdev); > - > - kfree(port->name); > - > - debugfs_remove(port->debugfs_file); > - > kfree(port); > } > > @@ -1566,6 +1558,14 @@ static void unplug_port(struct port *port) > */ > port-&g...
2013 Jul 19
2
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...a/drivers/char/virtio_console.c > +++ b/drivers/char/virtio_console.c > @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) > > port = container_of(kref, struct port, kref); > > - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); > - device_destroy(pdrvdata.class, port->dev->devt); > - cdev_del(port->cdev); > - > - kfree(port->name); > - > - debugfs_remove(port->debugfs_file); > - > kfree(port); > } > > @@ -1566,6 +1558,14 @@ static void unplug_port(struct port *port) > */ > port-&g...
2013 Jul 19
1
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...rs/char/virtio_console.c >>> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) >>> >>> port = container_of(kref, struct port, kref); >>> >>> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); >>> - device_destroy(pdrvdata.class, port->dev->devt); >>> - cdev_del(port->cdev); >>> - >>> - kfree(port->name); >>> - >>> - debugfs_remove(port->debugfs_file); >>> - >>> kfree(port); >>> } >>> >>> @@ -1566,6...
2013 Jul 19
1
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...rs/char/virtio_console.c >>> @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) >>> >>> port = container_of(kref, struct port, kref); >>> >>> - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); >>> - device_destroy(pdrvdata.class, port->dev->devt); >>> - cdev_del(port->cdev); >>> - >>> - kfree(port->name); >>> - >>> - debugfs_remove(port->debugfs_file); >>> - >>> kfree(port); >>> } >>> >>> @@ -1566,6...
2011 Mar 02
4
[PATCH 0/2] Fix hot-unplug: device removal while port in use
...access it. The second patch fixes a warning where the pci region is already freed. I'm not sure what or how the region gets freed, any clues there will be helpful. Thanks, Amit Amit Shah (2): virtio: console: Don't access vqs if device was unplugged virtio: console: Don't call device_destroy() on port device drivers/char/virtio_console.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) -- 1.7.4
2011 Mar 02
4
[PATCH 0/2] Fix hot-unplug: device removal while port in use
...access it. The second patch fixes a warning where the pci region is already freed. I'm not sure what or how the region gets freed, any clues there will be helpful. Thanks, Amit Amit Shah (2): virtio: console: Don't access vqs if device was unplugged virtio: console: Don't call device_destroy() on port device drivers/char/virtio_console.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) -- 1.7.4
2013 Jul 19
0
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...; > +++ b/drivers/char/virtio_console.c > > @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) > > > > port = container_of(kref, struct port, kref); > > > > - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); > > - device_destroy(pdrvdata.class, port->dev->devt); > > - cdev_del(port->cdev); > > - > > - kfree(port->name); > > - > > - debugfs_remove(port->debugfs_file); > > - > > kfree(port); > > } > > > > @@ -1566,6 +1558,14 @@ static void unplug...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...if (rc) { > + dev_err(&pdev->dev, "sysfs_create_group failed rc %d\n", rc); > + goto destroy_device; > + } > + dev_info(&pdev->dev, "Probe successful for %s\n", mdev->name); Useless noise, remove it. > + return 0; > +destroy_device: > + device_destroy(g_mic.mic_class, MKDEV(MAJOR(g_mic.mdev_id), mdev->id)); > +unmap_aper: > + iounmap(mdev->mmio.va); > +unmap_mmio: > + iounmap(mdev->aper.va); > +release_regions: > + pci_release_regions(pdev); > +disable_device: > + pci_disable_device(pdev); > +free_device: >...
2013 Aug 12
1
[PATCH v2 1/7] Intel MIC Host Driver for X100 family.
...if (rc) { > + dev_err(&pdev->dev, "sysfs_create_group failed rc %d\n", rc); > + goto destroy_device; > + } > + dev_info(&pdev->dev, "Probe successful for %s\n", mdev->name); Useless noise, remove it. > + return 0; > +destroy_device: > + device_destroy(g_mic.mic_class, MKDEV(MAJOR(g_mic.mdev_id), mdev->id)); > +unmap_aper: > + iounmap(mdev->mmio.va); > +unmap_mmio: > + iounmap(mdev->aper.va); > +release_regions: > + pci_release_regions(pdev); > +disable_device: > + pci_disable_device(pdev); > +free_device: >...
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
In the case where a virtio-console port is in use (opened by a program) and a virtio-console device is removed, the port is kept around but all the virtio-related state is assumed to be gone. When the port is finally released (close() called), we call device_destroy() on the port's device. This results in the parent device's structures to be freed as well. This includes the PCI regions for the virtio-console PCI device. Once this is done, however, virtio_pci_release_dev() kicks in, as the last ref to the virtio device is now gone, and attempts to do...
2011 Mar 14
1
[PATCH] virtio_pci: Prevent double-free of pci regions after device hot-unplug
In the case where a virtio-console port is in use (opened by a program) and a virtio-console device is removed, the port is kept around but all the virtio-related state is assumed to be gone. When the port is finally released (close() called), we call device_destroy() on the port's device. This results in the parent device's structures to be freed as well. This includes the PCI regions for the virtio-console PCI device. Once this is done, however, virtio_pci_release_dev() kicks in, as the last ref to the virtio device is now gone, and attempts to do...
2013 Jul 18
0
[PATCH 03/10] virtio: console: clean up port data immediately at time of unplug
...index b04ec95..6bf0df3 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) port = container_of(kref, struct port, kref); - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); - device_destroy(pdrvdata.class, port->dev->devt); - cdev_del(port->cdev); - - kfree(port->name); - - debugfs_remove(port->debugfs_file); - kfree(port); } @@ -1566,6 +1558,14 @@ static void unplug_port(struct port *port) */ port->portdev = NULL; + sysfs_remove_group(&port->dev-&...
2013 Jul 25
0
[PATCH v3 3/9] virtio: console: clean up port data immediately at time of unplug
...index b04ec95..6bf0df3 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1501,14 +1501,6 @@ static void remove_port(struct kref *kref) port = container_of(kref, struct port, kref); - sysfs_remove_group(&port->dev->kobj, &port_attribute_group); - device_destroy(pdrvdata.class, port->dev->devt); - cdev_del(port->cdev); - - kfree(port->name); - - debugfs_remove(port->debugfs_file); - kfree(port); } @@ -1566,6 +1558,14 @@ static void unplug_port(struct port *port) */ port->portdev = NULL; + sysfs_remove_group(&port->dev-&...
2013 Jul 25
18
[PATCH v3 0/9] virtio: console: fixes for bugs and races with unplug
Hello, This series fixes a few bugs and races with port unplug and the various file operations: read(), write() and close(). I started coding up an alternative locking mechanism based on the discussion earlier in this series, but some of what we already have has to remain, and the new code is sufficiently different, so I'd rather it bakes for a while, and I ensure there are no regressions
2013 Jul 25
18
[PATCH v3 0/9] virtio: console: fixes for bugs and races with unplug
Hello, This series fixes a few bugs and races with port unplug and the various file operations: read(), write() and close(). I started coding up an alternative locking mechanism based on the discussion earlier in this series, but some of what we already have has to remain, and the new code is sufficiently different, so I'd rather it bakes for a while, and I ensure there are no regressions
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
Hey Rusty, These are the patches that rework a few bits to make hot-unplug while ports are open not crash apps (or kernels). The problem is when hot-unplug is performed when a port is open, the cdev struct is kept around by the file pointers and when the app later does a 'close', things go boom-boom. This patch series makes sure port as well as device hot-unplug is now safe to perform
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
Hey Rusty, These are the patches that rework a few bits to make hot-unplug while ports are open not crash apps (or kernels). The problem is when hot-unplug is performed when a port is open, the cdev struct is kept around by the file pointers and when the app later does a 'close', things go boom-boom. This patch series makes sure port as well as device hot-unplug is now safe to perform
2020 Feb 18
2
[PATCH] vhost: introduce vDPA based backend
...es) //stuff if (refcount_dec_and_test(uses)) complete(completer) destroy side: if (refcount_dec_and_test(uses)) complete(completer) wait_for_completion(completer) // refcount now permanently == 0 Use a completion in driver code > + mutex_lock(&vhost_vdpa.mutex); > + device_destroy(vhost_vdpa.class, > + MKDEV(MAJOR(vhost_vdpa.devt), v->minor)); > + vhost_vdpa_free_minor(v->minor); > + mutex_unlock(&vhost_vdpa.mutex); > + kfree(v->vqs); > + kfree(v); This use after-fress vs vhost_vdpa_open prior to it setting the open bit. Maybe use xarray,...