From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amit Shah Subject: Re: [PATCH v4 04/12] virtio: console: Add freeze and restore handlers to support S4 Date: Wed, 7 Dec 2011 16:29:55 +0530 Message-ID: <20111207105955.GJ4651@amit-x200.redhat.com> References: <9f09629340556ddac37135bc3aab233f1154f86a.1323199985.git.amit.shah@redhat.com> <20111207104323.GE8326@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20111207104323.GE8326@redhat.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, levinsasha928@gmail.com, Virtualization List List-Id: virtualization@lists.linuxfoundation.org On (Wed) 07 Dec 2011 [12:43:24], Michael S. Tsirkin wrote: > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > > index e14f5aa..fd2fd6f 100644 > > --- a/drivers/char/virtio_console.c > > +++ b/drivers/char/virtio_console.c > > @@ -1844,6 +1844,60 @@ static unsigned int features[] = { > > VIRTIO_CONSOLE_F_MULTIPORT, > > }; > > > > +#ifdef CONFIG_PM > > +static int virtcons_freeze(struct virtio_device *vdev) > > +{ > > + struct ports_device *portdev; > > + struct port *port; > > + > > + portdev = vdev->priv; > > + > > + vdev->config->reset(vdev); > > > So here, cancel_work_sync might still be running. > If it does run, might it try to access the device > config? Could not determine this quickly, if yes it's a problem. Similar to the other comment: I don't see why just resetting device can cause config queue access to go bad. Amit