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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 27 Jan 2014 15:30:54 +0800 From: Jason Wang <jasowang@...hat.com> To: kys@...rosoft.com, haiyangz@...rosoft.com, devel@...uxdriverproject.org, netdev@...r.kernel.org, linux-kernel@...r.kernel.org Cc: Jason Wang <jasowang@...hat.com> Subject: [PATCH net] net: hyperv: initialize link status correctly Call netif_carrier_on() after register_device(). Otherwise it won't work since the device was still in NETREG_UNINITIALIZED state. Fixes a68f9614614749727286f675d15f1e09d13cb54a (hyperv: Fix race between probe and open calls) Cc: Haiyang Zhang <haiyangz@...rosoft.com> Cc: K. Y. Srinivasan <kys@...rosoft.com> Reported-by: Di Nie <dnie@...hat.com> Tested-by: Di Nie <dnie@...hat.com> Signed-off-by: Jason Wang <jasowang@...hat.com> --- drivers/net/hyperv/netvsc_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 71baeb3..dc11601 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -444,13 +444,13 @@ static int netvsc_probe(struct hv_device *dev, } memcpy(net->dev_addr, device_info.mac_adr, ETH_ALEN); - netif_carrier_on(net); - ret = register_netdev(net); if (ret != 0) { pr_err("Unable to register netdev.\n"); rndis_filter_device_remove(dev); free_netdev(net); + } else { + netif_carrier_on(net); } return ret; -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists