netdev
[Top] [All Lists]

Re: Proposed minor patch to net/core/iovec.c.

To: per.flock@xxxxxxxx (Per Flock)
Subject: Re: Proposed minor patch to net/core/iovec.c.
From: kuznet@xxxxxxxxxxxxx
Date: Tue, 6 Mar 2001 19:44:10 +0300 (MSK)
Cc: netdev@xxxxxxxxxxx
In-reply-to: <E6FE4E054F02D511818E00025558B61D036032@xxxxxxxxxxxxxxxxx> from "Per Flock" at Mar 6, 1 06:15:01 pm
Sender: owner-netdev@xxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>