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]
Date:   Thu, 19 Aug 2021 17:23:12 +0530
From:   Maulik Shah <mkshah@...eaurora.org>
To:     maz@...nel.org, tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-gpio@...r.kernel.org, bjorn.andersson@...aro.org,
        linus.walleij@...aro.org, tkjos@...gle.com, lsrao@...eaurora.org,
        Maulik Shah <mkshah@...eaurora.org>
Subject: [PATCH v2 2/3] irqdomain: Fix irq_domain_trim_hierarchy()

Currently tail marker is moving along with parent domain
irq data. Fix this to initialize only once from where all
parent domain needs trimming.

Also correct the valid irq chip check.

Signed-off-by: Maulik Shah <mkshah@...eaurora.org>
---
 kernel/irq/irqdomain.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 19e83e9..9f6187b 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1235,7 +1235,7 @@ static int irq_domain_trim_hierarchy(unsigned int virq)
 	 */
 	for (irqd = irq_data->parent_data; irqd; irq_data = irqd, irqd = irqd->parent_data) {
 		/* Can't have a valid irqchip after a trim marker */
-		if (irqd->chip && tail)
+		if (!IS_ERR(irqd->chip) && tail)
 			return -EINVAL;
 
 		/* Can't have an empty irqchip before a trim marker */
@@ -1247,7 +1247,8 @@ static int irq_domain_trim_hierarchy(unsigned int virq)
 			if (PTR_ERR(irqd->chip) != -ENOTCONN)
 				return -EINVAL;
 
-			tail = irq_data;
+			if (!tail)
+				tail = irq_data;
 		}
 	}
 
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ