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:	Mon, 11 Jun 2007 12:07:23 +0530
From:	Mithlesh Thukral <mithlesh@...xen.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	netdev@...r.kernel.org, amitkale@...xen.com,
	netxenproj@...syssoft.com, rob@...xen.com
Subject: Re: [PATCH 1/4] NetXen: Fix link status messages

On Sunday 10 June 2007 03:52, Jeff Garzik wrote:
> Mithlesh Thukral wrote:
> > -	if ((netif_running(netdev)) && !netif_carrier_ok(netdev)) {
> > -		printk(KERN_INFO "%s port %d, %s carrier is now ok\n",
> > -		       netxen_nic_driver_name, adapter->portnum, netdev->name);
> > +	if ((netdev->flags & IFF_UP) && !netif_carrier_ok(netdev) &&
> > +			netxen_nic_link_ok(adapter) ) {
> > +		printk(KERN_INFO "%s %s (port %d), Link is up\n",
> > +			       netxen_nic_driver_name, netdev->name, adapter->portnum);
> >  		netif_carrier_on(netdev);
> > -	}
> > -
> > -	if (netif_queue_stopped(netdev))
> >  		netif_wake_queue(netdev);
> > +	} else if(!(netdev->flags & IFF_UP) && netif_carrier_ok(netdev)) {
> > +		printk(KERN_ERR "%s %s Link is Down\n",
> > +				netxen_nic_driver_name, netdev->name);
> > +		netif_carrier_off(netdev);
> > +		netif_stop_queue(netdev);
>
> Most of the patch is OK, but by substituting IFF_UP tests for
> netif_running(), you are removing race-free, correct tests and replacing
> them with incorrect, racy tests.
>
> NAK the IFF_UP changes.  the rest looks OK.
I will rework the IFF_UP tests using netif_running(), test and resubmit the 
patches again.

Thanks,
Mithlesh Thukral
>
> 	Jeff
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ