Displaying 13 results from an estimated 13 matches for "config_work_handl".
Did you mean:
config_work_handler
2017 Jan 16
2
[PATCH v2] virtio_console: fix a crash in config_work_handler
Using control_work instead of config_work as the 3rd argument to
container_of results in an invalid portdev pointer. Indeed, the work
structure is initialized as below:
INIT_WORK(&portdev->config_work, &config_work_handler);
It leads to a crash when portdev->vdev is dereferenced later. This bug
is triggered when the guest uses a virtio-console without multiport
feature and receives a config_changed virtio interrupt.
Signed-off-by: G. Campana <gcampana at quarkslab.com>
---
drivers/char/virtio_console.c...
2017 Jan 16
2
[PATCH v2] virtio_console: fix a crash in config_work_handler
Using control_work instead of config_work as the 3rd argument to
container_of results in an invalid portdev pointer. Indeed, the work
structure is initialized as below:
INIT_WORK(&portdev->config_work, &config_work_handler);
It leads to a crash when portdev->vdev is dereferenced later. This bug
is triggered when the guest uses a virtio-console without multiport
feature and receives a config_changed virtio interrupt.
Signed-off-by: G. Campana <gcampana at quarkslab.com>
---
drivers/char/virtio_console.c...
2017 Jan 16
0
[PATCH v2] virtio_console: fix a crash in config_work_handler
On (Mon) 16 Jan 2017 [10:45:02], G. Campana wrote:
> Using control_work instead of config_work as the 3rd argument to
> container_of results in an invalid portdev pointer. Indeed, the work
> structure is initialized as below:
>
> INIT_WORK(&portdev->config_work, &config_work_handler);
>
> It leads to a crash when portdev->vdev is dereferenced later. This bug
> is triggered when the guest uses a virtio-console without multiport
> feature and receives a config_changed virtio interrupt.
>
> Signed-off-by: G. Campana <gcampana at quarkslab.com>
Revi...
2015 Feb 28
2
[PATCH] virtio_console: avoid config access from irq
...truct work_struct control_work;
+ struct work_struct config_work;
struct list_head ports;
@@ -1837,10 +1838,21 @@ static void config_intr(struct virtio_device *vdev)
portdev = vdev->priv;
+ if (!use_multiport(portdev))
+ schedule_work(&portdev->config_work);
+}
+
+static void config_work_handler(struct work_struct *work)
+{
+ struct ports_device *portdev;
+
+ portdev = container_of(work, struct ports_device, control_work);
if (!use_multiport(portdev)) {
+ struct virtio_device *vdev;
struct port *port;
u16 rows, cols;
+ vdev = portdev->vdev;
virtio_cread(vdev, struct vir...
2015 Feb 28
2
[PATCH] virtio_console: avoid config access from irq
...truct work_struct control_work;
+ struct work_struct config_work;
struct list_head ports;
@@ -1837,10 +1838,21 @@ static void config_intr(struct virtio_device *vdev)
portdev = vdev->priv;
+ if (!use_multiport(portdev))
+ schedule_work(&portdev->config_work);
+}
+
+static void config_work_handler(struct work_struct *work)
+{
+ struct ports_device *portdev;
+
+ portdev = container_of(work, struct ports_device, control_work);
if (!use_multiport(portdev)) {
+ struct virtio_device *vdev;
struct port *port;
u16 rows, cols;
+ vdev = portdev->vdev;
virtio_cread(vdev, struct vir...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...e_buf(buf);
- }
- }
- spin_unlock(&portdev->cvq_lock);
-}
-
static void in_intr(struct virtqueue *vq)
{
struct port *port;
@@ -1206,62 +1042,6 @@ fail:
return err;
}
-/*
- * The workhandler for config-space updates.
- *
- * This is called when ports are hot-added.
- */
-static void config_work_handler(struct work_struct *work)
-{
- struct virtio_console_config virtconconf;
- struct ports_device *portdev;
- struct virtio_device *vdev;
- int err;
-
- portdev = container_of(work, struct ports_device, config_work);
-
- vdev = portdev->vdev;
- vdev->config->get(vdev,
- offsetof(struct...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...e_buf(buf);
- }
- }
- spin_unlock(&portdev->cvq_lock);
-}
-
static void in_intr(struct virtqueue *vq)
{
struct port *port;
@@ -1206,62 +1042,6 @@ fail:
return err;
}
-/*
- * The workhandler for config-space updates.
- *
- * This is called when ports are hot-added.
- */
-static void config_work_handler(struct work_struct *work)
-{
- struct virtio_console_config virtconconf;
- struct ports_device *portdev;
- struct virtio_device *vdev;
- int err;
-
- portdev = container_of(work, struct ports_device, config_work);
-
- vdev = portdev->vdev;
- vdev->config->get(vdev,
- offsetof(struct...
2010 Apr 08
3
[PATCH 00/11] (v6) virtio: console: Fixes, new way of discovering ports
Hello,
This series reworks the ABI to allow port discovery (only) via the
control queue and enable multiport again.
In addition, it adds support for non-blocking write() support, which
means no spinning. This works fine with the recent patches that are on
qemu-devel.
Also included is removal of hvc_remove() as removing one such console
port causes other console ports (registered with hvc) to
2010 Apr 08
3
[PATCH 00/11] (v6) virtio: console: Fixes, new way of discovering ports
Hello,
This series reworks the ABI to allow port discovery (only) via the
control queue and enable multiport again.
In addition, it adds support for non-blocking write() support, which
means no spinning. This works fine with the recent patches that are on
qemu-devel.
Also included is removal of hvc_remove() as removing one such console
port causes other console ports (registered with hvc) to
2017 Jan 22
0
[PULL] vhost/virtio: cleanups and fixes
..._fabric_ops structures
virtio/s390: virtio: constify virtio_config_ops structures
Colin Ian King (1):
virtio/s390: add missing \n to end of dev_err message
Dan Carpenter (1):
vhost/scsi: silence uninitialized variable warning
G. Campana (1):
virtio_console: fix a crash in config_work_handler
Halil Pasic (2):
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
tools/virtio/ringtest: tweaks for s390
Pierre Morel (1):
virtio/s390: support READ_STATUS command for virtio-ccw
drivers/char/virtio_console.c | 2 +-
drivers/s390/virtio/virtio_ccw.c | 29 +...
2017 Jan 23
2
[PULL] vhost: cleanups and fixes
..._fabric_ops structures
virtio/s390: virtio: constify virtio_config_ops structures
Colin Ian King (1):
virtio/s390: add missing \n to end of dev_err message
Dan Carpenter (1):
vhost/scsi: silence uninitialized variable warning
G. Campana (1):
virtio_console: fix a crash in config_work_handler
Halil Pasic (2):
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
tools/virtio/ringtest: tweaks for s390
Pierre Morel (1):
virtio/s390: support READ_STATUS command for virtio-ccw
drivers/char/virtio_console.c | 2 +-
drivers/s390/virtio/virtio_ccw.c | 29 +...
2017 Jan 22
0
[PULL] vhost/virtio: cleanups and fixes
..._fabric_ops structures
virtio/s390: virtio: constify virtio_config_ops structures
Colin Ian King (1):
virtio/s390: add missing \n to end of dev_err message
Dan Carpenter (1):
vhost/scsi: silence uninitialized variable warning
G. Campana (1):
virtio_console: fix a crash in config_work_handler
Halil Pasic (2):
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
tools/virtio/ringtest: tweaks for s390
Pierre Morel (1):
virtio/s390: support READ_STATUS command for virtio-ccw
drivers/char/virtio_console.c | 2 +-
drivers/s390/virtio/virtio_ccw.c | 29 +...
2017 Jan 23
2
[PULL] vhost: cleanups and fixes
..._fabric_ops structures
virtio/s390: virtio: constify virtio_config_ops structures
Colin Ian King (1):
virtio/s390: add missing \n to end of dev_err message
Dan Carpenter (1):
vhost/scsi: silence uninitialized variable warning
G. Campana (1):
virtio_console: fix a crash in config_work_handler
Halil Pasic (2):
tools/virtio/ringtest: fix run-on-all.sh for offline cpus
tools/virtio/ringtest: tweaks for s390
Pierre Morel (1):
virtio/s390: support READ_STATUS command for virtio-ccw
drivers/char/virtio_console.c | 2 +-
drivers/s390/virtio/virtio_ccw.c | 29 +...