lkml.org 
[lkml]   [2001]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] ide-features.c: unchecked kmalloc
Hi,

Please consider applying.

- Arnaldo

--- linux-2.4.0-ac4/drivers/ide/ide-features.c Mon Jan 8 20:39:17 2001
+++ linux-2.4.0-ac4.acme/drivers/ide/ide-features.c Tue Jan 9 16:02:11 2001
@@ -189,6 +189,10 @@
__cli(); /* local CPU only; some systems need this */
SELECT_MASK(HWIF(drive), drive, 0);
id = kmalloc(SECTOR_WORDS*4, GFP_ATOMIC);
+ if (!id) {
+ __restore_flags(flags); /* local CPU only */
+ return 0;
+ }
ide_input_data(drive, id, SECTOR_WORDS);
(void) GET_STAT(); /* clear drive IRQ */
ide__sti(); /* local CPU only */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.036 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site