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-next>] [day] [month] [year] [list]
Message-Id: <1299610588-22356-1-git-send-email-nhorman@tuxdriver.com>
Date:	Tue,  8 Mar 2011 13:56:28 -0500
From:	Neil Horman <nhorman@...driver.com>
To:	netdev@...r.kernel.org
Cc:	Neil Horman <nhorman@...driver.com>,
	"David S. Miller" <davem@...emloft.net>,
	Michael Chan <mchan@...adcom.com>,
	Dmitry Kravkov <dmitry@...adcom.com>,
	Eddie Wai <waie@...adcom.com>,
	Eilon Greenstein <eilong@...adcom.com>
Subject: [PATCH] cnic: fix double initalization of bnx2 based cards

bnx2 cards can work with the cnic driver, but when the cnic driver detects a
bnx2 card, is_cnic_dev erroneously calls the initalization routines for both
bnx2 and bnx2x (the former being a regex subset of the later).  This causes
initalization of bnx2 to unilaterally fail in the cnic driver, which, while not
catastrophic, is definately not expected.  Fix this by choosing either the bnx2
or bnx2x initalization path, not both

Signed-off-by: Neil Horman <nhorman@...driver.com>
CC: David S. Miller <davem@...emloft.net>
CC: Michael Chan <mchan@...adcom.com>
CC: Dmitry Kravkov <dmitry@...adcom.com>
CC: Eddie Wai <waie@...adcom.com>
CC: Eilon Greenstein <eilong@...adcom.com>
---
 drivers/net/cnic.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/cnic.c b/drivers/net/cnic.c
index 271a1f0..18b59ad 100644
--- a/drivers/net/cnic.c
+++ b/drivers/net/cnic.c
@@ -5292,7 +5292,7 @@ static struct cnic_dev *is_cnic_dev(struct net_device *dev)
 
 		if (!strcmp(drvinfo.driver, "bnx2"))
 			cdev = init_bnx2_cnic(dev);
-		if (!strcmp(drvinfo.driver, "bnx2x"))
+		else if (!strcmp(drvinfo.driver, "bnx2x"))
 			cdev = init_bnx2x_cnic(dev);
 		if (cdev) {
 			write_lock(&cnic_dev_lock);
-- 
1.7.4

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