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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 13 Feb 2014 00:05:01 +0000
From:	Haiyang Zhang <haiyangz@...rosoft.com>
To:	Jason Wang <jasowang@...hat.com>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:	KY Srinivasan <kys@...rosoft.com>,
	"olaf@...fle.de" <olaf@...fle.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"driverdev-devel@...uxdriverproject.org" 
	<driverdev-devel@...uxdriverproject.org>
Subject: RE: [PATCH net,v2] hyperv: Fix the carrier status setting



> -----Original Message-----
> From: Jason Wang [mailto:jasowang@...hat.com]
> Sent: Tuesday, February 11, 2014 4:51 AM
> To: Haiyang Zhang; davem@...emloft.net; netdev@...r.kernel.org
> Cc: KY Srinivasan; olaf@...fle.de; linux-kernel@...r.kernel.org; driverdev-
> devel@...uxdriverproject.org
> Subject: Re: [PATCH net,v2] hyperv: Fix the carrier status setting
> 
> On 02/11/2014 02:15 AM, Haiyang Zhang wrote:
> > Without this patch, the "cat /sys/class/net/ethN/operstate" shows
> > "unknown", and "ethtool ethN" shows "Link detected: yes", when VM
> > boots up with or without vNIC connected.
> >
> > This patch fixed the problem.
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@...rosoft.com>
> > Reviewed-by: K. Y. Srinivasan <kys@...rosoft.com>
> > ---
> >  drivers/net/hyperv/netvsc_drv.c |   24 +++++++++++++++---------
> >  1 files changed, 15 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/net/hyperv/netvsc_drv.c
> > b/drivers/net/hyperv/netvsc_drv.c index 7756118..18916f7 100644
> > --- a/drivers/net/hyperv/netvsc_drv.c
> > +++ b/drivers/net/hyperv/netvsc_drv.c
> > @@ -88,8 +88,12 @@ static int netvsc_open(struct net_device *net)  {
> >  	struct net_device_context *net_device_ctx = netdev_priv(net);
> >  	struct hv_device *device_obj = net_device_ctx->device_ctx;
> > +	struct netvsc_device *nvdev;
> > +	struct rndis_device *rdev;
> >  	int ret = 0;
> >
> > +	netif_carrier_off(net);
> > +
> >  	/* Open up the device */
> >  	ret = rndis_filter_open(device_obj);
> >  	if (ret != 0) {
> > @@ -99,6 +103,11 @@ static int netvsc_open(struct net_device *net)
> >
> >  	netif_start_queue(net);
> >
> > +	nvdev = hv_get_drvdata(device_obj);
> > +	rdev = nvdev->extension;
> > +	if (!rdev->link_state)
> 
> What if the link status interrupt comes here at this time?

Thank you for pointing this out. I have submitted an updated patch.
- Haiyang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ