--- linux-2.6.0-test6/drivers/ide/ide-tape.c.orig 2003-10-06 11:13:00.000000000 -0300 +++ linux-2.6.0-test6/drivers/ide/ide-tape.c 2003-10-06 11:17:42.000000000 -0300 @@ -3026,7 +3026,8 @@ } #endif /* IDETAPE_DEBUG_BUGS */ count = min((unsigned int)(bh->b_size - atomic_read(&bh->b_count)), (unsigned int)n); - copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count); + if (copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count)) + return; n -= count; atomic_add(count, &bh->b_count); buf += count; @@ -3053,7 +3054,8 @@ } #endif /* IDETAPE_DEBUG_BUGS */ count = min(tape->b_count, n); - copy_to_user(buf, tape->b_data, count); + if (copy_to_user(buf, tape->b_data, count)) + return; n -= count; tape->b_data += count; tape->b_count -= count;