projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec64213
)
virtio: console: Check if port is valid in resize_console
author
Amit Shah
<amit.shah@redhat.com>
Fri, 19 Mar 2010 12:06:44 +0000
(17:36 +0530)
committer
Michael S. Tsirkin
<mst@redhat.com>
Mon, 22 Mar 2010 12:24:55 +0000
(14:24 +0200)
The console port could have been hot-unplugged. Check if it is valid
before working on it.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/char/virtio_console.c
patch
|
blob
|
history
diff --git
a/drivers/char/virtio_console.c
b/drivers/char/virtio_console.c
index 67b474b4167c070616d35a4f7bca0815e4aac664..44288ce0cb45520b144d9eec98a942c7812025c7 100644
(file)
--- a/
drivers/char/virtio_console.c
+++ b/
drivers/char/virtio_console.c
@@
-681,6
+681,10
@@
static void resize_console(struct port *port)
struct virtio_device *vdev;
struct winsize ws;
+ /* The port could have been hot-unplugged */
+ if (!port)
+ return;
+
vdev = port->portdev->vdev;
if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE)) {
vdev->config->get(vdev,