Displaying 20 results from an estimated 74 matches for "virtcons_remove".
2010 Aug 26
5
[PATCH 0/4] virtio: console: fixes, SIGIO
...le
for ports.
The first two patches fix bugs that I haven't seen, but look like the
right thing to do.
These have been tested extensively using the test-virtserial test
suite.
Please apply,
Amit.
Amit Shah (4):
virtio: console: Un-block reads on chardev close
virtio: console: Annotate virtcons_remove with __devexit_p
virtio: console: Send SIGIO to processes that request it for host
events
virtio: console: Send SIGIO on new data arrival on ports
drivers/char/virtio_console.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
--
1.7.2.2
2010 Aug 26
5
[PATCH 0/4] virtio: console: fixes, SIGIO
...le
for ports.
The first two patches fix bugs that I haven't seen, but look like the
right thing to do.
These have been tested extensively using the test-virtserial test
suite.
Please apply,
Amit.
Amit Shah (4):
virtio: console: Un-block reads on chardev close
virtio: console: Annotate virtcons_remove with __devexit_p
virtio: console: Send SIGIO to processes that request it for host
events
virtio: console: Send SIGIO on new data arrival on ports
drivers/char/virtio_console.c | 32 ++++++++++++++++++++++++++++++--
1 files changed, 30 insertions(+), 2 deletions(-)
--
1.7.2.2
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...->waitqueue);
- /* Fill the in_vq with buffers so the host can send us data. */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
+ /* We can safely ignore ENOSPC because it means
+ * the queue already has buffers. Buffers are removed
+ * only by virtcons_remove(), not by unplug_port()
+ */
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating inbufs\n");
- err = -ENOMEM;
goto free_device;
}
@@ -2059,14 +2060,11 @@ static int virtcons_probe(s...
2019 Nov 14
3
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...->waitqueue);
- /* Fill the in_vq with buffers so the host can send us data. */
- nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
- if (!nr_added_bufs) {
+ /* We can safely ignore ENOSPC because it means
+ * the queue already has buffers. Buffers are removed
+ * only by virtcons_remove(), not by unplug_port()
+ */
+ err = fill_queue(port->in_vq, &port->inbuf_lock);
+ if (err < 0 && err != -ENOSPC) {
dev_err(port->dev, "Error allocating inbufs\n");
- err = -ENOMEM;
goto free_device;
}
@@ -2059,14 +2060,11 @@ static int virtcons_probe(s...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...>] show_stack+0x74/0xc0
[<80757240>] dump_stack+0xd0/0x110
[<80430d98>] __warn+0xfc/0x130
[<80430ee0>] warn_slowpath_null+0x2c/0x3c
[<807e7c6c>] free_buf+0x1a8/0x288
[<807ea590>] remove_port_data+0x50/0xac
[<807ea6a0>] unplug_port+0xb4/0x1bc
[<807ea858>] 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...
2016 Oct 11
2
[PATCH] virtio: console: Unlock vqs while freeing buffers
...>] show_stack+0x74/0xc0
[<80757240>] dump_stack+0xd0/0x110
[<80430d98>] __warn+0xfc/0x130
[<80430ee0>] warn_slowpath_null+0x2c/0x3c
[<807e7c6c>] free_buf+0x1a8/0x288
[<807ea590>] remove_port_data+0x50/0xac
[<807ea6a0>] unplug_port+0xb4/0x1bc
[<807ea858>] 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...
2013 Jan 17
2
[PATCH] virtio_console: Don't access uninitialized data.
...ry_to_grab_pending+0x0/0x17e
62031c38: [<6004e984>] get_work_gcwq+0x71/0x8f
62031c48: [<60050539>] __cancel_work_timer+0x5b/0x115
62031c78: [<628acc85>] unplug_port+0x0/0x191 [virtio_console]
62031c98: [<6005061c>] cancel_work_sync+0x12/0x14
62031ca8: [<628ace96>] virtcons_remove+0x80/0x15c [virtio_console]
62031ce8: [<628191de>] virtio_dev_remove+0x1e/0x7e [virtio]
62031d08: [<601cf242>] __device_release_driver+0x75/0xe4
62031d28: [<601cf2dd>] device_release_driver+0x2c/0x40
62031d48: [<601ce0dd>] driver_unbind+0x7d/0xc6
62031d88: [<601cd5d9...
2013 Jan 17
2
[PATCH] virtio_console: Don't access uninitialized data.
...ry_to_grab_pending+0x0/0x17e
62031c38: [<6004e984>] get_work_gcwq+0x71/0x8f
62031c48: [<60050539>] __cancel_work_timer+0x5b/0x115
62031c78: [<628acc85>] unplug_port+0x0/0x191 [virtio_console]
62031c98: [<6005061c>] cancel_work_sync+0x12/0x14
62031ca8: [<628ace96>] virtcons_remove+0x80/0x15c [virtio_console]
62031ce8: [<628191de>] virtio_dev_remove+0x1e/0x7e [virtio]
62031d08: [<601cf242>] __device_release_driver+0x75/0xe4
62031d28: [<601cf2dd>] device_release_driver+0x2c/0x40
62031d48: [<601ce0dd>] driver_unbind+0x7d/0xc6
62031d88: [<601cd5d9...
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
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
..., 22 insertions(+), 0 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 031be0b..96c5ed9 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2190,6 +2190,27 @@ static struct virtio_driver virtio_rproc_serial = {
.remove = virtcons_remove,
};
+int class_virtio_ports_uevent(struct device *_dev, struct kobj_uevent_env *env)
+{
+ struct port *port = dev_get_drvdata(_dev);
+ struct device *dev;
+ int err;
+
+ if (!port || !port->portdev || !port->portdev->vdev)
+ return 0;
+
+ dev = &port->portdev->vdev->dev;
+...
2013 Jan 17
1
[RFC] virtio_console: Add DRIVER and INTERFACE to uevent.
..., 22 insertions(+), 0 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 031be0b..96c5ed9 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2190,6 +2190,27 @@ static struct virtio_driver virtio_rproc_serial = {
.remove = virtcons_remove,
};
+int class_virtio_ports_uevent(struct device *_dev, struct kobj_uevent_env *env)
+{
+ struct port *port = dev_get_drvdata(_dev);
+ struct device *dev;
+ int err;
+
+ if (!port || !port->portdev || !port->portdev->vdev)
+ return 0;
+
+ dev = &port->portdev->vdev->dev;
+...
2019 Dec 03
0
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...ill the in_vq with buffers so the host can send us data. */
> - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
> - if (!nr_added_bufs) {
> + /* We can safely ignore ENOSPC because it means
> + * the queue already has buffers. Buffers are removed
> + * only by virtcons_remove(), not by unplug_port()
> + */
> + err = fill_queue(port->in_vq, &port->inbuf_lock);
> + if (err < 0 && err != -ENOSPC) {
> dev_err(port->dev, "Error allocating inbufs\n");
> - err = -ENOMEM;
> goto free_device;
> }
>
> @@ -20...
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...+ if (err < 0) {
dev_err(&vdev->dev,
"Error allocating buffers for control queue\n");
/*
@@ -2077,7 +2071,7 @@ static int virtcons_probe(struct virtio_device *vdev)
VIRTIO_CONSOLE_DEVICE_READY, 0);
/* Device was functional: we need full cleanup. */
virtcons_remove(vdev);
- return -ENOMEM;
+ return err;
}
} else {
/*
--
2.23.0
2019 Nov 13
2
[PATCH v2] virtio_console: allocate inbufs in add_port() only if it is needed
...+ if (err < 0) {
dev_err(&vdev->dev,
"Error allocating buffers for control queue\n");
/*
@@ -2077,7 +2071,7 @@ static int virtcons_probe(struct virtio_device *vdev)
VIRTIO_CONSOLE_DEVICE_READY, 0);
/* Device was functional: we need full cleanup. */
virtcons_remove(vdev);
- return -ENOMEM;
+ return err;
}
} else {
/*
--
2.23.0
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
Hey Rusty,
Here are a few fixes for virtio and virtio_console.
The first patch ensures the data elements of vqs are properly
initialised at allocation-time so that we don't trigger BUG_ONs. I found
this when hot-unplugging ports and there was just one unused buffer.
detach_unused_buffers() kept returning pointers that were invalid. I
didn't catch this earlier as I had the in_vq filled
2010 Feb 12
4
[PATCH 0/6] virtio: console: Fixes
Hey Rusty,
Here are a few fixes for virtio and virtio_console.
The first patch ensures the data elements of vqs are properly
initialised at allocation-time so that we don't trigger BUG_ONs. I found
this when hot-unplugging ports and there was just one unused buffer.
detach_unused_buffers() kept returning pointers that were invalid. I
didn't catch this earlier as I had the in_vq filled
2019 Dec 03
1
[PATCH v3] virtio_console: allocate inbufs in add_port() only if it is needed
...s so the host can send us data. */
> > - nr_added_bufs = fill_queue(port->in_vq, &port->inbuf_lock);
> > - if (!nr_added_bufs) {
> > + /* We can safely ignore ENOSPC because it means
> > + * the queue already has buffers. Buffers are removed
> > + * only by virtcons_remove(), not by unplug_port()
> > + */
> > + err = fill_queue(port->in_vq, &port->inbuf_lock);
> > + if (err < 0 && err != -ENOSPC) {
> > dev_err(port->dev, "Error allocating inbufs\n");
> > - err = -ENOMEM;
> > goto free_devic...
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq.
Works by sheer luck, and is explicitly forbidden by spec. And while
going over it I saw that error handling is also broken -
failure is easy to trigger if I force allocations to fail.
Lightly tested.
Michael S. Tsirkin (6):
virtio_console: don't tie bufs to a vq
virtio: add ability to iterate over vqs
virtio_console:
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq.
Works by sheer luck, and is explicitly forbidden by spec. And while
going over it I saw that error handling is also broken -
failure is easy to trigger if I force allocations to fail.
Lightly tested.
Michael S. Tsirkin (6):
virtio_console: don't tie bufs to a vq
virtio: add ability to iterate over vqs
virtio_console: