From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756639Ab1LGPww (ORCPT ); Wed, 7 Dec 2011 10:52:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28524 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756152Ab1LGPwv (ORCPT ); Wed, 7 Dec 2011 10:52:51 -0500 Date: Wed, 7 Dec 2011 17:54:35 +0200 From: "Michael S. Tsirkin" To: Amit Shah Cc: Virtualization List , Rusty Russell , levinsasha928@gmail.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 04/12] virtio: console: Add freeze and restore handlers to support S4 Message-ID: <20111207155435.GB23845@redhat.com> References: <9f09629340556ddac37135bc3aab233f1154f86a.1323199985.git.amit.shah@redhat.com> <20111207104323.GE8326@redhat.com> <20111207105955.GJ4651@amit-x200.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111207105955.GJ4651@amit-x200.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 07, 2011 at 04:29:55PM +0530, Amit Shah wrote: > 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 Hmm, not sure anymore. Sorry.