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: <20240928-fix_wakeirq-v1-1-25d13a7e13ba@quicinc.com>
Date: Sat, 28 Sep 2024 02:26:27 -0700
From: Zijun Hu <quic_zijuhu@...cinc.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <len.brown@...el.com>,
        Pavel Machek <pavel@....cz>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Johan Hovold <johan+linaro@...nel.org>, Tony Lindgren <tony@...mide.com>,
        Zijun Hu <zijun_hu@...oud.com>, <linux-pm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH RFC] PM: sleep: wakeirq: Fix a serious logical error in
 dev_pm_disarm_wake_irq()

IT is a serious logical error for dev_pm_disarm_wake_irq() not to disable
the wake irq enabled by dev_pm_arm_wake_irq(), fixed by simply correcting
the wrong if condition.

Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
List relevant commits as following:

johan+linaro@...nel.org  2023-07-13
Commit: 8527beb12087 ("PM: sleep: wakeirq: fix wake irq arming")

tony@...mide.com  2018-02-09
Commit: 69728051f5bf ("PM / wakeirq: Fix unbalanced IRQ enable for wakeirq")

The former commit fixes the later.
---
 drivers/base/power/wakeirq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/power/wakeirq.c b/drivers/base/power/wakeirq.c
index 5a5a9e978e85..8b15f9a0e8f9 100644
--- a/drivers/base/power/wakeirq.c
+++ b/drivers/base/power/wakeirq.c
@@ -356,7 +356,7 @@ void dev_pm_disarm_wake_irq(struct wake_irq *wirq)
 		disable_irq_wake(wirq->irq);
 
 		if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED &&
-		    !(wirq->status & WAKE_IRQ_DEDICATED_ENABLED))
+		    (wirq->status & WAKE_IRQ_DEDICATED_ENABLED))
 			disable_irq_nosync(wirq->irq);
 	}
 }

---
base-commit: eb46cb321f1f3f3102f4ad3d61dd5c8c06cdbf17
change-id: 20240928-fix_wakeirq-276ff826970e

Best regards,
-- 
Zijun Hu <quic_zijuhu@...cinc.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ