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: <1505894901-9403-2-git-send-email-arvind.yadav.cs@gmail.com>
Date:   Wed, 20 Sep 2017 13:38:19 +0530
From:   Arvind Yadav <arvind.yadav.cs@...il.com>
To:     tglx@...utronix.de, jason@...edaemon.net, marc.zyngier@....com,
        vz@...ia.com, slemieux.tyco@...il.com
Cc:     linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 1/4] irqchip/gic-v3-its: Handle return value of kasprintf

kasprintf() can fail here and we must check its return value.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
---
 drivers/irqchip/irq-gic-v3-its-pci-msi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/irqchip/irq-gic-v3-its-pci-msi.c b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
index 14a8c0a..f703069 100644
--- a/drivers/irqchip/irq-gic-v3-its-pci-msi.c
+++ b/drivers/irqchip/irq-gic-v3-its-pci-msi.c
@@ -158,6 +158,9 @@ static int __init its_pci_of_msi_init(void)
 	its_entry = (struct acpi_madt_generic_translator *)header;
 	node_name = kasprintf(GFP_KERNEL, "ITS@...lx",
 			      (long)its_entry->base_address);
+	if (!node_name)
+		return -ENOMEM;
+
 	dom_handle = iort_find_domain_token(its_entry->translation_id);
 	if (!dom_handle) {
 		pr_err("%s: Unable to locate ITS domain handle\n", node_name);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ