[lkml]   [2001]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] __idetape_kmalloc_stage return code check in ide-tape.c (244-ac16)

This trivial patch adds a kmalloc check to ide-tape.c::
idetape_onstream_read_back_buffer as per the Stanford team's report
way back. It applies against 244ac16.

Reading the code I was not sure if it was OK to just return
or more should be done. Please sanity check this.

--- linux-244-ac11-clean/drivers/ide/ide-tape.c Sat May 19 21:06:35 2001
+++ linux-244-ac11/drivers/ide/ide-tape.c Sun May 20 14:58:44 2001
@@ -3472,6 +3472,11 @@
printk(KERN_INFO "ide-tape: %s: reading back %d frames from the drive's internal buffer\n", tape->name, frames);
for (i = 0; i < frames; i++) {
stage = __idetape_kmalloc_stage(tape, 0, 0);
+ if(!stage) {
+ printk(KERN_WARNING "(idetape:) Failed to allocate memory for buffer\n");
+ return;
+ }
if (!first)
first = stage;
aux = stage->aux;
'Xenix is the pinnacle of modern UNIX design, and will be used for many
years to come' -Xenix OS API manual
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:53    [W:0.232 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site