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]
Message-ID: <tip-88299c9bdb109e0d95abdca648065631ff91b2cb@git.kernel.org>
Date:	Wed, 27 Aug 2014 02:21:30 -0700
From:	tip-bot for Dan Carpenter <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
	gorcunov@...nvz.org, tglx@...utronix.de, viro@...iv.linux.org.uk,
	dan.carpenter@...cle.com
Subject: [tip:timers/core] timerfd: Remove an always true check

Commit-ID:  88299c9bdb109e0d95abdca648065631ff91b2cb
Gitweb:     http://git.kernel.org/tip/88299c9bdb109e0d95abdca648065631ff91b2cb
Author:     Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Fri, 1 Aug 2014 11:28:48 +0300
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Wed, 27 Aug 2014 11:17:48 +0200

timerfd: Remove an always true check

We would have returned -EINVAL earlier if ticks wasn't set.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Alexander Viro <viro@...iv.linux.org.uk>
Cc: Cyrill Gorcunov <gorcunov@...nvz.org>
Link: http://lkml.kernel.org/r/20140801082848.GF28869@mwanda
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 fs/timerfd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/timerfd.c b/fs/timerfd.c
index 80c3502..b46ffa9 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -333,8 +333,7 @@ static long timerfd_ioctl(struct file *file, unsigned int cmd, unsigned long arg
 		spin_lock_irq(&ctx->wqh.lock);
 		if (!timerfd_canceled(ctx)) {
 			ctx->ticks = ticks;
-			if (ticks)
-				wake_up_locked(&ctx->wqh);
+			wake_up_locked(&ctx->wqh);
 		} else
 			ret = -ECANCELED;
 		spin_unlock_irq(&ctx->wqh.lock);
--
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