From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] net/virtio-net: reverse unregistering on exit Date: Tue, 22 Aug 2017 21:17:54 +0300 Message-ID: <20170822211736-mutt-send-email-mst@kernel.org> References: <1503413992-29558-1-git-send-email-pmorel@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1503413992-29558-1-git-send-email-pmorel@linux.vnet.ibm.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: Pierre Morel Cc: virtualization@lists.linux-foundation.org List-Id: virtualization@lists.linuxfoundation.org On Tue, Aug 22, 2017 at 04:59:51PM +0200, Pierre Morel wrote: > Hi, > > I got a problem with virtio-net in a QEMU guest. > > When virtio-net is used as a module in a guest and the network is > activated, removing the virtio-net modules produces a kernel error: > > [ 2375.624949] Last Breaking-Event-Address: > [ 2375.624954] [<00000000001453d4>] __cpuhp_remove_state+0x84/0x1a8 > [ 2375.624959] ---[ end trace cc9fd68b89f5235a ]--- > [ 2375.624966] Error: Removing state 163 which has instances left. > [ 2375.624985] ------------[ cut here ]------------ Which kernel do you use? > The problem is produced by an inversion in the order of unregistering > the driver and the hotplug state machine callbacks in virtio_net_driver_exit. > > This patch solves the problem by first unregistering the virtio_net_driver > before unregistering the hotplug state machine callbacks. > > Best regards, > > Pierre Morel > > Pierre Morel (1): > net/virtio-net: reverse unregistering on exit > > drivers/net/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > -- > 2.7.4