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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1363082294.7518.4.camel@cliu38-desktop-build>
Date:	Tue, 12 Mar 2013 17:58:14 +0800
From:	Chuansheng Liu <chuansheng.liu@...el.com>
To:	tglx@...utronix.de
Cc:	mingo@...hat.com, linux-kernel@...r.kernel.org,
	chuansheng.liu@...el.com
Subject: [PATCH 2/3] genirq: Do not consider the irqs with IRQF_NO_SUSPEND
 in check_wakeup_irqs()


According to commit 9c6079aa1bf(genirq: Do not consider disabled
wakeup irqs), we should not break the suspend when one interrupt has
been disabled before suspending and is pending there.

But there is another case missed:
If an interrupt which is marked IRQF_NO_SUSPEND has been disabled
before suspend invocation then desc->depth is 1 and therefor it should
not be checked for IRQS_PENDING in check_wakeup_irqs().

Here also checking if the desc->istate & IRQS_SUSPENDED is true to avoid
this case.

Signed-off-by: liu chuansheng <chuansheng.liu@...el.com>
---
 kernel/irq/pm.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index cb228bf..f02a03d 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -107,9 +107,16 @@ int check_wakeup_irqs(void)
 		 * Only interrupts which are marked as wakeup source
 		 * and have not been disabled before the suspend check
 		 * can abort suspend.
+		 *
+		 * Meanwhile, if an interrupt which is marked IRQF_NO_SUSPEND
+		 * has been disabled before suspend invocation then
+		 * desc->depth is 1 and therefor it should not be checked
+		 * for IRQS_PENDING, so also adding the checking of
+		 * desc->istate & IRQS_SUSPENDED for this case.
 		 */
 		if (irqd_is_wakeup_set(&desc->irq_data)) {
-			if (desc->depth == 1 && desc->istate & IRQS_PENDING)
+			if (desc->depth == 1 && (desc->istate & IRQS_PENDING)
+				&& (desc->istate & IRQS_SUSPENDED))
 				return -EBUSY;
 			continue;
 		}
-- 
1.7.0.4



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