* [PATCHv1 net] xen-netfront: handle backend CLOSED without CLOSING
@ 2014-02-04 18:50 David Vrabel
2014-02-05 4:43 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: David Vrabel @ 2014-02-04 18:50 UTC (permalink / raw)
To: xen-devel
Cc: David Vrabel, Konrad Rzeszutek Wilk, Boris Ostrovsky, netdev,
David S. Miller
From: David Vrabel <david.vrabel@citrix.com>
Backend drivers shouldn't transistion to CLOSED unless the frontend is
CLOSED. If a backend does transition to CLOSED too soon then the
frontend may not see the CLOSING state and will not properly shutdown.
So, treat an unexpected backend CLOSED state the same as CLOSING.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
Cc: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>
---
drivers/net/xen-netfront.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index ff04d4f..f9daa9e 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1832,7 +1832,6 @@ static void netback_changed(struct xenbus_device *dev,
case XenbusStateReconfiguring:
case XenbusStateReconfigured:
case XenbusStateUnknown:
- case XenbusStateClosed:
break;
case XenbusStateInitWait:
@@ -1847,6 +1846,10 @@ static void netback_changed(struct xenbus_device *dev,
netdev_notify_peers(netdev);
break;
+ case XenbusStateClosed:
+ if (dev->state == XenbusStateClosed)
+ break;
+ /* Missed the backend's CLOSING state -- fallthrough */
case XenbusStateClosing:
xenbus_frontend_closed(dev);
break;
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCHv1 net] xen-netfront: handle backend CLOSED without CLOSING
2014-02-04 18:50 [PATCHv1 net] xen-netfront: handle backend CLOSED without CLOSING David Vrabel
@ 2014-02-05 4:43 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-02-05 4:43 UTC (permalink / raw)
To: david.vrabel; +Cc: xen-devel, konrad.wilk, boris.ostrovsky, netdev
From: David Vrabel <david.vrabel@citrix.com>
Date: Tue, 4 Feb 2014 18:50:26 +0000
> From: David Vrabel <david.vrabel@citrix.com>
>
> Backend drivers shouldn't transistion to CLOSED unless the frontend is
> CLOSED. If a backend does transition to CLOSED too soon then the
> frontend may not see the CLOSING state and will not properly shutdown.
>
> So, treat an unexpected backend CLOSED state the same as CLOSING.
>
> Signed-off-by: David Vrabel <david.vrabel@citrix.com>
> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-05 4:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 18:50 [PATCHv1 net] xen-netfront: handle backend CLOSED without CLOSING David Vrabel
2014-02-05 4:43 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).