+ drivers-char-agp-sgi-agpc-check-kmalloc-return-value.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     drivers/char/agp/sgi-agp.c: check kmalloc() return value
has been added to the -mm tree.  Its filename is
     drivers-char-agp-sgi-agpc-check-kmalloc-return-value.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: drivers/char/agp/sgi-agp.c: check kmalloc() return value
From: Amit Choudhary <amit2030@xxxxxxxxx>

Signed-off-by: Amit Choudhary <amit2030@xxxxxxxxx>
Cc: Dave Jones <davej@xxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/char/agp/sgi-agp.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff -puN drivers/char/agp/sgi-agp.c~drivers-char-agp-sgi-agpc-check-kmalloc-return-value drivers/char/agp/sgi-agp.c
--- a/drivers/char/agp/sgi-agp.c~drivers-char-agp-sgi-agpc-check-kmalloc-return-value
+++ a/drivers/char/agp/sgi-agp.c
@@ -281,10 +281,11 @@ static int __devinit agp_sgi_init(void)
 	else
 		return 0;
 
-	sgi_tioca_agp_bridges =
-	    (struct agp_bridge_data **)kmalloc(tioca_gart_found *
-					       sizeof(struct agp_bridge_data *),
-					       GFP_KERNEL);
+	sgi_tioca_agp_bridges = 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) {
_

Patches currently in -mm which might be from amit2030@xxxxxxxxx are

drivers-char-agp-sgi-agpc-check-kmalloc-return-value.patch
git-dvb.patch
fs-jffs2-scanc-fix-error-path-leak.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux