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:   Sun, 31 Mar 2019 21:49:37 -0700
From:   Andrey Smirnov <andrew.smirnov@...il.com>
To:     linux-mtd@...ts.infradead.org
Cc:     Andrey Smirnov <andrew.smirnov@...il.com>,
        Brian Norris <computersforpeace@...il.com>,
        Boris Brezillon <boris.brezillon@...tlin.com>,
        Marek Vasut <marek.vasut@...il.com>,
        Chris Healy <cphealy@...il.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] mtd: devices: m25p80: Drop extra length clamping in m25p80_write()

All of the needed length clamping should already be taken care of by
spi_mem_adjust_op_size(). No check like this is done in read path, so
this extra check in write doesn't appear to be necessary. Drop it.

Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: Brian Norris <computersforpeace@...il.com>
Cc: Boris Brezillon <boris.brezillon@...tlin.com>
Cc: Marek Vasut <marek.vasut@...il.com>
Cc: Chris Healy <cphealy@...il.com>
Cc: linux-mtd@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org
---
 drivers/mtd/devices/m25p80.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 114f8ccea85b..a54cad9bb6e3 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -103,7 +103,6 @@ static ssize_t m25p80_write(struct spi_nor *nor, loff_t to, size_t len,
 	ret = spi_mem_adjust_op_size(flash->spimem, &op);
 	if (ret)
 		return ret;
-	op.data.nbytes = len < op.data.nbytes ? len : op.data.nbytes;
 
 	ret = spi_mem_exec_op(flash->spimem, &op);
 	if (ret)
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ