[PATCH 1/2] virtio: console: Don't access vqs if device was unplugged

2011-03-02 Thread Amit Shah
If a virtio-console device gets unplugged while a port is open, a subsequent close() call on the port accesses vqs to free up buffers. This can lead to a crash. The buffers are already freed up as a result of the call to unplug_ports() from virtcons_remove(). The fix is to simply not access vq

[PATCH 2/2] virtio: console: Don't call device_destroy() on port device

2011-03-02 Thread Amit Shah
This results in a warning mentioning the region being removed is already gone. CC: sta...@kernel.org Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/char/virtio_console.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/char/virtio_console.c

Re: [PATCH 0/2] Fix hot-unplug: device removal while port in use

2011-03-02 Thread Rusty Russell
On Wed, 2 Mar 2011 13:53:06 +0530, Amit Shah amit.s...@redhat.com wrote: A crash was observed when a device gets removed while a port is in use. When the port gets removed, we tried to free vq buffers. The vq no longer exists at this stage, just ensure we don't access it. The second patch

Re: [PATCH 0/2] Fix hot-unplug: device removal while port in use

2011-03-02 Thread Amit Shah
On (Wed) 02 Mar 2011 [21:38:08], Rusty Russell wrote: On Wed, 2 Mar 2011 13:53:06 +0530, Amit Shah amit.s...@redhat.com wrote: A crash was observed when a device gets removed while a port is in use. When the port gets removed, we tried to free vq buffers. The vq no longer exists at this

RE: [PATCH 4/6] Staging: hv: Unify the hyperv driver abstractions

2011-03-02 Thread KY Srinivasan
-Original Message- From: Greg KH [mailto:g...@kroah.com] Sent: Wednesday, March 02, 2011 12:41 AM To: KY Srinivasan Cc: gre...@suse.de; linux-ker...@vger.kernel.org; de...@linuxdriverproject.org; virtualizat...@lists.osdl.org; Haiyang Zhang; Hank Janssen Subject: Re: [PATCH

Re: [PATCH 4/6] Staging: hv: Unify the hyperv driver abstractions

2011-03-02 Thread Greg KH
On Thu, Mar 03, 2011 at 02:50:00AM +, KY Srinivasan wrote: struct driver_context? Oh please no. Greg; this is the patch that consolidates the state in struct hv_driver into struct driver_context. In the spirit of doing one thing in a patch; other relevant changes are made