Hello!
> Attached is a patch that corrects what I belive is a minor flaw in
> copy_and_csum_toiovec().
> Currently there is no distinction between a csum error and an io error. If a
> user application provides a bad buffer, this would result in incoming
> segments being silently discarded (copy_and_csum_toiovec() returns -EINVAL).
> What should happen, to my understanding, is that the error from
> csum_and_copy_to_user() should be returned so that the user application is
> notified.
Damn, the bug is more profound. I forgot some details, when reusing
this function (written for tcp) in UDP...
In the case of tcp kind of error is inessential: all that we should
make is to stop fast path. Case of EFAULT is handled in slow path then.
But udp really does not sense error!
Alexey
|