Messages in this thread | | | Subject | Re: [PATCH -mm] idetape gcc 4.1 warning fix | From | Alan Cox <> | Date | Wed, 10 May 2006 11:42:18 +0100 |
| |
On Maw, 2006-05-09 at 19:55 -0700, Daniel Walker wrote: > Fixes the following warning, > > drivers/ide/ide-tape.c: In function ‘idetape_copy_stage_from_user’: > drivers/ide/ide-tape.c:2662: warning: ignoring return value of ‘copy_from_user’, declared with attribute warn_unused_result > drivers/ide/ide-tape.c: In function ‘idetape_copy_stage_to_user’:
> 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); > + WARN_ON(copy_from_user(bh->b_data + atomic_read(&bh->b_count), buf, count));
So you want to let users spew all over the kernel log when a copy from user fails. Either fix it properly or leave it alone. In this case its actually quite hard to fix properly which is why it hasn't been done.
(POSIX doesn't require invalid addresses reliably report -EFAULT)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |