Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xemul@openvz.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][NET]: Fix wrong interpretation of some copy_to_user() results.
Date: Fri, 25 Apr 2008 01:48:30 -0700 (PDT)	[thread overview]
Message-ID: <20080425.014830.98287734.davem@davemloft.net> (raw)
In-Reply-To: <48119953.6060808@openvz.org>

From: Pavel Emelyanov <xemul@openvz.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@openvz.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.

      reply	other threads:[~2008-04-25  8:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-25  8:41 [PATCH][NET]: Fix wrong interpretation of some copy_to_user() results Pavel Emelyanov
2008-04-25  8:48 ` David Miller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080425.014830.98287734.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox