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: <1416540206-18103-1-git-send-email-jiang.liu@linux.intel.com>
Date:	Fri, 21 Nov 2014 11:23:26 +0800
From:	Jiang Liu <jiang.liu@...ux.intel.com>
To:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	Grant Likely <grant.likely@...aro.org>,
	Marc Zyngier <marc.zyngier@....com>,
	Yijing Wang <wangyijing@...wei.com>,
	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>,
	Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Matthias Brugger <matthias.bgg@...il.com>
Cc:	Jiang Liu <jiang.liu@...ux.intel.com>,
	Tony Luck <tony.luck@...el.com>, linux-kernel@...r.kernel.org,
	linux-pci@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [Patch irqdomain: Enhance irq_domain_free_irqs_common() to support parentless irqdomain

Originally irq_domain_free_irqs_common() is designed to be used by
irqdomains with parent. But there are desires to reuse for parentless
irqdomains for code reduction.
So check domain->parent before invoking irq_domain_free_irqs_parent().

Signed-off-by: Jiang Liu <jiang.liu@...ux.intel.com>
---
Hi Thomas,
	This patch applies to tip/irq/irqdomain, it helps to reduce code
size on ARM. Seems we still have chance to merge it into tip/irq/irqdomain:)
Regards!
Gerry
---
 kernel/irq/irqdomain.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index 029acf11efed..0449d2869e17 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -975,7 +975,8 @@ void irq_domain_free_irqs_common(struct irq_domain *domain, unsigned int virq,
 		if (irq_data)
 			irq_domain_reset_irq_data(irq_data);
 	}
-	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
+	if (domain->parent)
+		irq_domain_free_irqs_parent(domain, virq, nr_irqs);
 }
 
 /**
-- 
1.7.10.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