Michael S. Tsirkin
2015-Feb-28 17:41 UTC
[PATCH] virtio_console: init work unconditionally
when multiport is off, we don't initialize config work, but we then cancel uninitialized control_work on freeze. Signed-off-by: Michael S. Tsirkin <mst at redhat.com> --- drivers/char/virtio_console.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index fae2dbb..def736d 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2040,12 +2040,13 @@ static int virtcons_probe(struct virtio_device *vdev) virtio_device_ready(portdev->vdev); + INIT_WORK(&portdev->control_work, &control_work_handler); + if (multiport) { unsigned int nr_added_bufs; spin_lock_init(&portdev->c_ivq_lock); spin_lock_init(&portdev->c_ovq_lock); - INIT_WORK(&portdev->control_work, &control_work_handler); nr_added_bufs = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); -- MST
On (Sat) 28 Feb 2015 [18:41:34], Michael S. Tsirkin wrote:> when multiport is off, we don't initialize config work, > but we then cancel uninitialized control_work on freeze. > > Signed-off-by: Michael S. Tsirkin <mst at redhat.com>Reviewed-by: Amit Shah <amit.shah at redhat.com> Amit
Amit Shah <amit.shah at redhat.com> writes:> On (Sat) 28 Feb 2015 [18:41:34], Michael S. Tsirkin wrote: >> when multiport is off, we don't initialize config work, >> but we then cancel uninitialized control_work on freeze. >> >> Signed-off-by: Michael S. Tsirkin <mst at redhat.com> > > Reviewed-by: Amit Shah <amit.shah at redhat.com>Thanks, applied. Cheers, Rusty.
Possibly Parallel Threads
- [PATCH] virtio_console: init work unconditionally
- [PATCH] virtio_console: init work unconditionally
- [PATCH] virtio_console: init work unconditionally
- [PATCH] virtio_console: avoid config access from irq
- [PATCH] virtio_console: avoid config access from irq