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]
Message-Id: <1297283106-10035-1-git-send-email-sakari.ailus@iki.fi>
Date:	Wed,  9 Feb 2011 22:25:06 +0200
From:	Sakari Ailus <sakari.ailus@....fi>
To:	netdev@...r.kernel.org
Cc:	error27@...il.com
Subject: [PATCH 1/1] tlan: Fix bugs introduced by the last tlan cleanup patch

Fix two bugs introduced by the patch "tlan: Code cleanup: checkpatch.pl is
relatively happy now." In that patch, TLAN_CSTAT_READY was considered as a
bit mask containing a single bit set while it was actually had two set
instead.

Many thanks to Dan Carpenter for finding the mistake.

Signed-off-by: Sakari Ailus <sakari.ailus@....fi>
---
 drivers/net/tlan.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 0678e7e..e48a808 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -1522,7 +1522,8 @@ static u32 tlan_handle_tx_eof(struct net_device *dev, u16 host_int)
 		head_list = priv->tx_list + priv->tx_head;
 		head_list_phys = priv->tx_list_dma
 			+ sizeof(struct tlan_list)*priv->tx_head;
-		if (head_list->c_stat & TLAN_CSTAT_READY) {
+		if ((head_list->c_stat & TLAN_CSTAT_READY)
+		    == TLAN_CSTAT_READY) {
 			outl(head_list_phys, dev->base_addr + TLAN_CH_PARM);
 			ack |= TLAN_HC_GO;
 		} else {
@@ -1766,7 +1767,8 @@ static u32 tlan_handle_tx_eoc(struct net_device *dev, u16 host_int)
 		head_list = priv->tx_list + priv->tx_head;
 		head_list_phys = priv->tx_list_dma
 			+ sizeof(struct tlan_list)*priv->tx_head;
-		if (head_list->c_stat & TLAN_CSTAT_READY) {
+		if ((head_list->c_stat & TLAN_CSTAT_READY)
+		    == TLAN_CSTAT_READY) {
 			netif_stop_queue(dev);
 			outl(head_list_phys, dev->base_addr + TLAN_CH_PARM);
 			ack |= TLAN_HC_GO;
-- 
1.7.2.3

--
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