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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1420817555-22828-1-git-send-email-dinguyen@opensource.altera.com>
Date:	Fri, 9 Jan 2015 09:32:35 -0600
From:	<dinguyen@...nsource.altera.com>
To:	<dwmw2@...radead.org>
CC:	<dinh.linux@...il.com>, <computersforpeace@...il.com>,
	<yamada.m@...panasonic.com>, <josh@...htriplett.org>,
	<shijie8@...il.com>, <linux-mtd@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>,
	Graham Moore <grmoore@...nsource.altera.com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>
Subject: [PATCH] mtd: denali: fix incorrect bitmask error in denali_setup_dma

From: Graham Moore <grmoore@...nsource.altera.com>

commit "3157d1ed2309 mtd: denali: remove unnecessary casts" introduced
an error by using a wrong bitmask.

A uint16_t cast was replaced with & 0xff, should be & 0xffff.

Signed-off-by: Graham Moore <grmoore@...nsource.altera.com>
Signed-off-by: Dinh Nguyen <dinguyen@...nsource.altera.com>
---
 drivers/mtd/nand/denali.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index b3b7ca1..5e397fb 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1041,7 +1041,7 @@ static void denali_setup_dma(struct denali_nand_info *denali, int op)
 	index_addr(denali, mode | ((addr >> 16) << 8), 0x2200);
 
 	/* 3. set memory low address bits 23:8 */
-	index_addr(denali, mode | ((addr & 0xff) << 8), 0x2300);
+	index_addr(denali, mode | ((addr & 0xffff) << 8), 0x2300);
 
 	/* 4. interrupt when complete, burst len = 64 bytes */
 	index_addr(denali, mode | 0x14000, 0x2400);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ