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] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 09 Jun 2007 18:22:30 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Mithlesh Thukral <mithlesh@...xen.com>
CC:	netdev@...r.kernel.org, amitkale@...xen.com,
	netxenproj@...syssoft.com, rob@...xen.com
Subject: Re: [PATCH 1/4] NetXen: Fix link status messages

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.

	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