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: <201110131516.03408.bzolnier@gmail.com>
Date:	Thu, 13 Oct 2011 15:16:03 +0200
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2] ide: fix for ide_timing quantisation errors

From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
Subject: [PATCH v2] ide: fix for ide_timing quantisation errors

Based on commit 4f701d1 ("ata_timing: ensure t->cycle is always
correct") for libata.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
v2: fixed comment style

earlier references:
https://lkml.org/lkml/2010/1/18/274

 drivers/ide/ide-timings.c |    8 ++++++++
 1 file changed, 8 insertions(+)

Index: b/drivers/ide/ide-timings.c
===================================================================
--- a/drivers/ide/ide-timings.c
+++ b/drivers/ide/ide-timings.c
@@ -206,6 +206,14 @@ int ide_timing_compute(ide_drive_t *driv
 		t->recover = t->cycle - t->active;
 	}
 
+	/*
+	 * In a few cases quantisation may produce enough errors to
+	 * leave t->cycle too low for the sum of active and recovery
+	 * if so we must correct this
+	 */
+	if (t->active + t->recover > t->cycle)
+		t->cycle = t->active + t->recover;
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(ide_timing_compute);
--
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