* [PATCH net-next 0/2] ldmvsw: port removal stability
@ 2017-05-15 17:51 Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware Shannon Nelson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Shannon Nelson @ 2017-05-15 17:51 UTC (permalink / raw)
To: davem, netdev; +Cc: sparclinux, Shannon Nelson
Under heavy reboot stress testing we found a couple of timing issues
when removing the device that could cause the kernel great heartburn,
addressed by these two patches.
Shannon Nelson (1):
ldmvsw: stop the clean timer at beginning of remove
Thomas Tai (1):
ldmvsw: unregistering netdev before disable hardware
drivers/net/ethernet/sun/ldmvsw.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware
2017-05-15 17:51 [PATCH net-next 0/2] ldmvsw: port removal stability Shannon Nelson
@ 2017-05-15 17:51 ` Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 2/2] ldmvsw: stop the clean timer at beginning of remove Shannon Nelson
2017-05-15 19:36 ` [PATCH net-next 0/2] ldmvsw: port removal stability David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Shannon Nelson @ 2017-05-15 17:51 UTC (permalink / raw)
To: davem, netdev; +Cc: sparclinux, Thomas Tai, Shannon Nelson
From: Thomas Tai <thomas.tai@oracle.com>
When running LDom binding/unbinding test, kernel may panic
in ldmvsw_open(). It is more likely that because we're removing
the ldc connection before unregistering the netdev in vsw_port_remove(),
we set up a window of time where one process could be removing the
device while another trying to UP the device. This also sometimes causes
vio handshake error due to opening a device without closing it completely.
We should unregister the netdev before we disable the "hardware".
Orabug: 25980913, 25925306
Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
drivers/net/ethernet/sun/ldmvsw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c
index 5a90fed..309747c 100644
--- a/drivers/net/ethernet/sun/ldmvsw.c
+++ b/drivers/net/ethernet/sun/ldmvsw.c
@@ -413,6 +413,7 @@ static int vsw_port_remove(struct vio_dev *vdev)
del_timer_sync(&port->vio.timer);
napi_disable(&port->napi);
+ unregister_netdev(port->dev);
list_del_rcu(&port->list);
@@ -427,7 +428,6 @@ static int vsw_port_remove(struct vio_dev *vdev)
dev_set_drvdata(&vdev->dev, NULL);
- unregister_netdev(port->dev);
free_netdev(port->dev);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] ldmvsw: stop the clean timer at beginning of remove
2017-05-15 17:51 [PATCH net-next 0/2] ldmvsw: port removal stability Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware Shannon Nelson
@ 2017-05-15 17:51 ` Shannon Nelson
2017-05-15 19:36 ` [PATCH net-next 0/2] ldmvsw: port removal stability David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Shannon Nelson @ 2017-05-15 17:51 UTC (permalink / raw)
To: davem, netdev; +Cc: sparclinux, Shannon Nelson
Stop the clean timer earlier to be sure there's no asynchronous
interference while stopping the port.
Orabug: 25748241
Signed-off-by: Shannon Nelson <shannon.nelson@oracle.com>
---
drivers/net/ethernet/sun/ldmvsw.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/sun/ldmvsw.c b/drivers/net/ethernet/sun/ldmvsw.c
index 309747c..5b56c24 100644
--- a/drivers/net/ethernet/sun/ldmvsw.c
+++ b/drivers/net/ethernet/sun/ldmvsw.c
@@ -411,6 +411,7 @@ static int vsw_port_remove(struct vio_dev *vdev)
if (port) {
del_timer_sync(&port->vio.timer);
+ del_timer_sync(&port->clean_timer);
napi_disable(&port->napi);
unregister_netdev(port->dev);
@@ -418,7 +419,6 @@ static int vsw_port_remove(struct vio_dev *vdev)
list_del_rcu(&port->list);
synchronize_rcu();
- del_timer_sync(&port->clean_timer);
spin_lock_irqsave(&port->vp->lock, flags);
sunvnet_port_rm_txq_common(port);
spin_unlock_irqrestore(&port->vp->lock, flags);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 0/2] ldmvsw: port removal stability
2017-05-15 17:51 [PATCH net-next 0/2] ldmvsw: port removal stability Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 2/2] ldmvsw: stop the clean timer at beginning of remove Shannon Nelson
@ 2017-05-15 19:36 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-05-15 19:36 UTC (permalink / raw)
To: shannon.nelson; +Cc: netdev, sparclinux
From: Shannon Nelson <shannon.nelson@oracle.com>
Date: Mon, 15 May 2017 10:51:06 -0700
> Under heavy reboot stress testing we found a couple of timing issues
> when removing the device that could cause the kernel great heartburn,
> addressed by these two patches.
These are pretty legit bug fixes so I've applied this series to net,
thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-15 19:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-15 17:51 [PATCH net-next 0/2] ldmvsw: port removal stability Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware Shannon Nelson
2017-05-15 17:51 ` [PATCH net-next 2/2] ldmvsw: stop the clean timer at beginning of remove Shannon Nelson
2017-05-15 19:36 ` [PATCH net-next 0/2] ldmvsw: port removal stability 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).