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>] [day] [month] [year] [list]
Date:	Thu, 12 May 2016 12:52:03 +0300
From:	Roger Quadros <rogerq@...com>
To:	<boris.brezillon@...e-electrons.com>
CC:	<dwmw2@...radead.org>, <nm@...com>, <linux-kernel@...r.kernel.org>,
	Roger Quadros <rogerq@...com>
Subject: [PATCH] mtd: nand: ratelimit ecc error message

If NAND has gone bad or filesystem gets corrupted then the console can
get flooded with ecc error messages. Ratelimit the error message.

Reported-by: Nishanth Menon <nm@...com>
Signed-off-by: Roger Quadros <rogerq@...com>
---
 drivers/mtd/nand/nand_bch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c
index b585bae..321dc0d 100644
--- a/drivers/mtd/nand/nand_bch.c
+++ b/drivers/mtd/nand/nand_bch.c
@@ -97,7 +97,7 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
 					errloc[i]);
 		}
 	} else if (count < 0) {
-		printk(KERN_ERR "ecc unrecoverable error\n");
+		pr_err_ratelimited("ecc unrecoverable error\n");
 		count = -EBADMSG;
 	}
 	return count;
-- 
2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ