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: <20121009072047.GB19159@elgon.mountain>
Date:	Tue, 9 Oct 2012 10:20:48 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Kevin Curtis <kevin.curtis@...site.co.uk>
Cc:	netdev@...r.kernel.org, kernel-janitors@...r.kernel.org,
	"David S. Miller" <davem@...emloft.net>
Subject: [patch] farsync: fix support for over 30 cards

We're trying to fill a 64 bit bitmap but only the lower 30 shifts work
because the shift wraps around.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
---
Static checker stuff.  No one actually has over 30 of these cards...  :P

diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 1a62318..b627132 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -597,7 +597,7 @@ fst_q_work_item(u64 * queue, int card_index)
 	 * bottom half for the card.  Note the limitation of 64 cards.
 	 * That ought to be enough
 	 */
-	mask = 1 << card_index;
+	mask = (u64)1 << card_index;
 	*queue |= mask;
 	spin_unlock_irqrestore(&fst_work_q_lock, flags);
 }
--
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