lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1494870668-65047-2-git-send-email-shannon.nelson@oracle.com> Date: Mon, 15 May 2017 10:51:07 -0700 From: Shannon Nelson <shannon.nelson@...cle.com> To: davem@...emloft.net, netdev@...r.kernel.org Cc: sparclinux@...r.kernel.org, Thomas Tai <thomas.tai@...cle.com>, Shannon Nelson <shannon.nelson@...cle.com> Subject: [PATCH net-next 1/2] ldmvsw: unregistering netdev before disable hardware From: Thomas Tai <thomas.tai@...cle.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@...cle.com> Signed-off-by: Shannon Nelson <shannon.nelson@...cle.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
Powered by blists - more mailing lists