]> Git Repo - linux.git/commitdiff
xen-netback: only deinitialized hash if it was initialized
authorPaul Durrant <[email protected]>
Wed, 18 May 2016 14:55:42 +0000 (15:55 +0100)
committerDavid S. Miller <[email protected]>
Fri, 20 May 2016 21:41:18 +0000 (17:41 -0400)
A domain with a frontend that does not implement a control ring has been
seen to cause a crash during domain save. This was apparently because
the call to xenvif_deinit_hash() in xenvif_disconnect_ctrl() is made
regardless of whether a control ring was connected, and hence
xenvif_hash_init() was called.

This patch brings the call to xenvif_deinit_hash() in
xenvif_disconnect_ctrl() inside the if clause that checks whether the
control ring event channel was connected. This is sufficient to ensure
it is only called if xenvif_init_hash() was called previously.

Signed-off-by: Paul Durrant <[email protected]>
Reported-by: Boris Ostrovsky <[email protected]>
Tested-by: Boris Ostrovsky <[email protected]>
Cc: Wei Liu <[email protected]>
Acked-by: Wei Liu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/xen-netback/interface.c

index 1c7f49b5acc17805f5983ed41839472fa8c8d5d8..83deeebfc2d194518a8eaf6a18970199e6fb9d31 100644 (file)
@@ -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;
        }
This page took 0.059624 seconds and 4 git commands to generate.