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] [day] [month] [year] [list]
Message-ID: <tip-d102eb5c1ac5e6743b1c6d145c06a25d98ad1375@git.kernel.org>
Date:   Fri, 14 Oct 2016 05:31:40 -0700
From:   tip-bot for Dan Carpenter <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jason@...edaemon.net, tglx@...utronix.de, hpa@...or.com,
        marc.zyngier@....com, mingo@...nel.org,
        linux-kernel@...r.kernel.org, sudeep.holla@....com,
        dan.carpenter@...cle.com
Subject: [tip:irq/urgent] irqchip/gicv3: Handle loop timeout proper

Commit-ID:  d102eb5c1ac5e6743b1c6d145c06a25d98ad1375
Gitweb:     http://git.kernel.org/tip/d102eb5c1ac5e6743b1c6d145c06a25d98ad1375
Author:     Dan Carpenter <dan.carpenter@...cle.com>
AuthorDate: Fri, 14 Oct 2016 10:26:21 +0300
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 14 Oct 2016 14:26:55 +0200

irqchip/gicv3: Handle loop timeout proper

The timeout loop terminates when the loop count is zero, but the decrement
of the count variable is post check. So count is -1 when we check for the
timeout and therefor the error message is supressed.

Change it to predecrement, so the error message is emitted.

[ tglx: Massaged changelog ] 

Fixes: a2c225101234 ("irqchip: gic-v3: Refactor gic_enable_redist to support both enabling and disabling")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: Sudeep Holla <sudeep.holla@....com>
Cc: Marc Zyngier <marc.zyngier@....com>
Cc: kernel-janitors@...r.kernel.org
Cc: Jason Cooper <jason@...edaemon.net>
Cc: stable@...r.kernel.org
Link: http://lkml.kernel.org/r/20161014072534.GA15168@mwanda
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>

---
 drivers/irqchip/irq-gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 9b81bd8..19d642e 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -153,7 +153,7 @@ static void gic_enable_redist(bool enable)
 			return;	/* No PM support in this redistributor */
 	}
 
-	while (count--) {
+	while (--count) {
 		val = readl_relaxed(rbase + GICR_WAKER);
 		if (enable ^ (bool)(val & GICR_WAKER_ChildrenAsleep))
 			break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ