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:   Fri, 18 Aug 2017 02:28:49 -0700
From:   tip-bot for David Daney <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mark.rutland@....com, marc.zyngier@....com, tglx@...utronix.de,
        hpa@...or.com, linus.walleij@...aro.org, david.daney@...ium.com,
        linux-kernel@...r.kernel.org, gnurou@...il.com, mingo@...nel.org
Subject: [tip:irq/core] irqdomain: Check for NULL function pointer in
 irq_domain_free_irqs_hierarchy()

Commit-ID:  0d12ec075a18f53e6f58ec95a4f534da2641bf9b
Gitweb:     http://git.kernel.org/tip/0d12ec075a18f53e6f58ec95a4f534da2641bf9b
Author:     David Daney <david.daney@...ium.com>
AuthorDate: Thu, 17 Aug 2017 17:53:33 -0700
Committer:  Thomas Gleixner <tglx@...utronix.de>
CommitDate: Fri, 18 Aug 2017 11:21:42 +0200

irqdomain: Check for NULL function pointer in irq_domain_free_irqs_hierarchy()

A follow-on patch will call irq_domain_free_irqs_hierarchy() when the
free() function pointer may be NULL.

Add a NULL pointer check to handle this new use case.

Signed-off-by: David Daney <david.daney@...ium.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Marc Zyngier <marc.zyngier@....com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Alexandre Courbot <gnurou@...il.com>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: linux-gpio@...r.kernel.org
Link: http://lkml.kernel.org/r/1503017616-3252-5-git-send-email-david.daney@cavium.com

---
 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 2093b88..24fda75 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -1362,7 +1362,8 @@ static void irq_domain_free_irqs_hierarchy(struct irq_domain *domain,
 					   unsigned int irq_base,
 					   unsigned int nr_irqs)
 {
-	domain->ops->free(domain, irq_base, nr_irqs);
+	if (domain->ops->free)
+		domain->ops->free(domain, irq_base, nr_irqs);
 }
 
 int irq_domain_alloc_irqs_hierarchy(struct irq_domain *domain,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ