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>] [day] [month] [year] [list]
Message-Id: <20061231141412.dd084d36.amit2030@gmail.com>
Date:	Sun, 31 Dec 2006 14:14:12 -0800
From:	Amit Choudhary <amit2030@...il.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH 2.6.20-rc2] drivers/char/agp/sgi-agp.c: check kmalloc()
 return value.

Description: Check the return value of kmalloc() in function agp_sgi_init(), in file drivers/char/agp/sgi-agp.c.

Signed-off-by: Amit Choudhary <amit2030@...il.com>

diff --git a/drivers/char/agp/sgi-agp.c b/drivers/char/agp/sgi-agp.c
index d73be4c..5897e6c 100644
--- a/drivers/char/agp/sgi-agp.c
+++ b/drivers/char/agp/sgi-agp.c
@@ -285,6 +285,8 @@ static int __devinit agp_sgi_init(void)
 	    (struct agp_bridge_data **)kmalloc(tioca_gart_found *
 					       sizeof(struct agp_bridge_data *),
 					       GFP_KERNEL);
+	if (!sgi_tioca_agp_bridges)
+		return -ENOMEM;
 
 	j = 0;
 	list_for_each_entry(info, &tioca_list, ca_list) {
-
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