[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20080425.014830.98287734.davem@davemloft.net>
Date: Fri, 25 Apr 2008 01:48:30 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: xemul@...nvz.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH][NET]: Fix wrong interpretation of some copy_to_user()
results.
From: Pavel Emelyanov <xemul@...nvz.org>
Date: Fri, 25 Apr 2008 12:41:55 +0400
> I found some places, that erroneously return the value obtained from
> the copy_to_user() call: if some amount of bytes were not able to get
> to the user (this is what this one returns) the proper behavior is to
> return the -EFAULT error, not that number itself.
>
> Signed-off-by: Pavel Emelyanov <xemul@...nvz.org>
I gues you're not a real kernel programmer unless you've made this
mistake at least once :-) It kind of prove this is a bad interface,
since it's so easy to use incorrectly.
This was already caught in a tcp_probe fix I applied earlier today,
so I removed that part.
The rest is applied and I'll queue for -stable, thanks Pavel.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists