浏览代码

Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux

Pull virtio fix from Rusty Russell:
 "Obviously I forgot to push this before linux.conf.au..."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
  virtio_console: Don't access uninitialized data.
Linus Torvalds 12 年之前
父节点
当前提交
124b69b6cc
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      drivers/char/virtio_console.c

+ 2 - 1
drivers/char/virtio_console.c

@@ -2062,7 +2062,8 @@ static void virtcons_remove(struct virtio_device *vdev)
 	/* Disable interrupts for vqs */
 	vdev->config->reset(vdev);
 	/* Finish up work that's lined up */
-	cancel_work_sync(&portdev->control_work);
+	if (use_multiport(portdev))
+		cancel_work_sync(&portdev->control_work);
 
 	list_for_each_entry_safe(port, port2, &portdev->ports, list)
 		unplug_port(port);