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: <1404198022-19083-1-git-send-email-askb23@gmail.com>
Date:	Tue,  1 Jul 2014 12:30:22 +0530
From:	Anil Belur <askb23@...il.com>
To:	shalinmehta85@...il.com, dan.carpenter@...cle.com,
	daeseok.youn@...il.com, gregkh@...uxfoundation.org
Cc:	speakup@...ille.uwo.ca, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org, Anil Belur <askb23@...il.com>
Subject: [PATCH 1/1] staging: speakup: main.c - use time_after()

From: Anil Belur <askb23@...il.com>

- this patch fixes jiffies comparision with a safer function to prevent
  any overflows

Signed-off-by: Anil Belur <askb23@...il.com>
---
 drivers/staging/speakup/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 7de79d5..0cd3cdb 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
 			if (up_flag)
 				goto out;
 			if (last_keycode == keycode &&
-			    last_spk_jiffy + MAX_DELAY > jiffies) {
+			    time_after(last_spk_jiffy + MAX_DELAY, jiffies)) {
 				spk_close_press = 1;
 				offset = spk_shift_table[shift_info + 32];
 				/* double press? */
-- 
1.9.1

--
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