Re: BUG: mmapfile/writev spurious zero bytes (x86_64/not i386, bisected,reproducable)

From: Andi Kleen
Date: Tue Jun 17 2008 - 17:16:29 EST


Linus Torvalds wrote:
>
> On Tue, 17 Jun 2008, Linus Torvalds wrote:
>> I don't think that code is reasonably salvageable. Damn.
>
> Hmm. Something like this *may* salvage it.
>
> Untested, so far (I'll reboot and test soon enough), but even if it fixes
> things, it's not really very good.

If that fixes anything:
- The caller is broken because it shouldn't pass a faulting source to copy_to_user()
- And you broken copy_from_user error reporting which shares the same code

-Andi


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/