From patchwork Wed May 18 14:27:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 9119821 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9CEFA9F30C for ; Wed, 18 May 2016 14:31:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CA0C820165 for ; Wed, 18 May 2016 14:31:22 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E801B20160 for ; Wed, 18 May 2016 14:31:21 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b32TP-0007Oc-3q; Wed, 18 May 2016 14:29:19 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b32TN-0007OW-W5 for xen-devel@lists.xen.org; Wed, 18 May 2016 14:29:18 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id 6C/BD-07924-D3C7C375; Wed, 18 May 2016 14:29:17 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNIsWRWlGSWpSXmKPExsWyU9JRQteqxib coOWnhsWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmtH8rJ2pYLpARe/So6wNjH/4uxg5OSQE/CSO zLrPBGKzCehILD06H8wWEQiTeN/zjRHEFhbQkDh2dDELRFxTYl5fH5TtJHF82y92EJtFQFVi8 ovZYL28Au4Sry68BIsLCWhLfJn/kRXEZhSQlfjSuJoZxGYWEJe49QRil4SAgMSSPeeZIWxRiZ eP/7FC2AYSW5fuA9rFAVSvKbF+lz5Eq6LElO6H7BCrBCVOznzCArFKRWLL4wNQY7glVn7+wzK BUXgWkm2zECbNQjJpFpJJCxhZVjFqFKcWlaUW6Roa6iUVZaZnlOQmZuboGhoY6+WmFhcnpqfm JCYV6yXn525iBAY+AxDsYFz92+kQoyQHk5Ior3OFTbgQX1J+SmVGYnFGfFFpTmrxIUYNDg6Bz WtXX2CUYsnLz0tVkuBlrQaqEyxKTU+tSMvMAcYmTKkEB4+SCO+/KqA0b3FBYm5xZjpE6hSjLs eWBTfWMgmBzZAS590DUiQAUpRRmgc3ApYmLjHKSgnzMgIdKMRTkFqUm1mCKv+KUZyDUUmYlwn kEp7MvBK4Ta+AjmACOuKWGNgRJYkIKakGRu2dLy4bCmU5nTYNPTnVsOKNmDTXMmvXA3qb8n3E gk/f/J6fpCug+FIiuk3a3P1zbdULP80+7/e7nTdnbJsYv9xh5lLvxOg3c/2L93cfElj3+kfGy xqJ22m3e1IYGyedyPwotP10rm3azhMVEqWND1qL166wSBJZIn9z3esXVU3ySb93bDhTocRSnJ FoqMVcVJwIAD6dZY0OAwAA X-Env-Sender: prvs=93930de3f=Paul.Durrant@citrix.com X-Msg-Ref: server-9.tower-31.messagelabs.com!1463581754!7909872!1 X-Originating-IP: [185.25.65.24] X-SpamReason: No, hits=0.0 required=7.0 tests=received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 34604 invoked from network); 18 May 2016 14:29:14 -0000 Received: from smtp.ctxuk.citrix.com (HELO SMTP.EU.CITRIX.COM) (185.25.65.24) by server-9.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 May 2016 14:29:14 -0000 X-IronPort-AV: E=Sophos;i="5.26,329,1459814400"; d="scan'208";a="22178183" From: Paul Durrant To: Boris Ostrovsky , xen-devel Thread-Topic: Saving a guest crashes dom0 Thread-Index: AQHRsQzIRLZodwJZZEO0zRk9CQc9lJ++vgVggAABJXCAAAFkEA== Date: Wed, 18 May 2016 14:27:20 +0000 Message-ID: <7a7f4f35db514e0fa112e59dd2e686be@AMSPEX02CL03.citrite.net> References: <573C7407.5020706@oracle.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted MIME-Version: 1.0 X-DLP: AMS1 Subject: Re: [Xen-devel] Saving a guest crashes dom0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP > > -----Original Message----- > > From: Paul Durrant > > Sent: 18 May 2016 15:18 > > To: 'Boris Ostrovsky'; xen-devel > > Subject: RE: Saving a guest crashes dom0 > > > > > -----Original Message----- > > > From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com] > > > Sent: 18 May 2016 14:54 > > > To: xen-devel; Paul Durrant > > > Subject: Saving a guest crashes dom0 > > > > > > Saving a guest (xl save) crashes dom0, log below. > > > > > > Paul, this seems to be happening in the code that you modified > > > recently. If you don't have time I can look at this but it will > > > probably have to wait until tomorrow. > > > > > > > No, this looks problematic, I'll look now... What was the guest? > > > > Never mind. I see the problem. Disconnection of the control ring is done > regardless of whether a control ring was connected and the hash deinit is not > adequately protected. I'll come up with a patch. > This should fix the problem for you: diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index 1c7f49b..83deeeb 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -780,9 +780,8 @@ void xenvif_disconnect_ctrl(struct xenvif *vif) vif->ctrl_task = NULL; } - xenvif_deinit_hash(vif); - if (vif->ctrl_irq) { + xenvif_deinit_hash(vif); unbind_from_irqhandler(vif->ctrl_irq, vif); vif->ctrl_irq = 0; }