mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: do_sendfile ppos check ...
Date: Fri, 4 Nov 2005 14:16:49 +1100	[thread overview]
Message-ID: <20051104031649.GA25858@gondor.apana.org.au> (raw)
In-Reply-To: <20051104031012.GD22020@MAIL.13thfloor.at>

On Fri, Nov 04, 2005 at 04:10:13AM +0100, Herbert Poetzl wrote:
> 
> currently investigating ... probably a removal of
> the 'unnecessary' check (*ppos) would be a better
> approach, something like:
> 
> --- linux-2.6/fs/read_write.c   2005-10-28 23:59:02.000000000 +0200
> +++ linux-2.6/fs/read_write.c   2005-11-03 17:28:50.000000000 +0100
> @@ -719,9 +719,6 @@
>        	current->syscr++;
>        	current->syscw++;
> 
> -       if (*ppos > max)
> -               retval = -EOVERFLOW;
> -

This still doesn't make sense.  If ppos came in as NULL, it should
have become non-NULL long before it reaches this part of the function.

Look at the top of the do_sendfile function, it sets ppos if it is NULL.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2005-11-04  3:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-03 17:56 Herbert Poetzl
2005-11-04  2:36 ` Herbert Xu
2005-11-04  3:10   ` Herbert Poetzl
2005-11-04  3:16     ` Herbert Xu [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=20051104031649.GA25858@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®