From: Linus Torvalds <torvalds@osdl.org>
To: Prasanna Meda <pmeda@akamai.com>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: sendfile bugs(?)
Date: Tue, 10 Aug 2004 20:13:38 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.58.0408102007120.1839@ppc970.osdl.org> (raw)
In-Reply-To: <41198757.44B373C1@akamai.com>
On Tue, 10 Aug 2004, Prasanna Meda wrote:
>
> There seems to be couple of issues in sendfile code.
> - read_write.c: sys_sendfile:do_sendfile checks for ppos
> to be NULL, the intension is checking the contents for
> zero.
No, it really checks the _pointer_ for NULL.
A NULL ptr means that it's not a pread interface, but that we should use
f_pos. It's for when the user doesn't pass in any ppos thing: see
sys_sendfile() for the two cases.
> - locks_verify_write() may checks at different offset for
> permission, and copy at different offset, since it is also
> using out_file->f_pos. And also it will be cleaner to
> update out_file->f_pos atomically only when it succeeds.
> It also deletes the dependency on f_pos from filemap.c.
Yes, this part is probably worth doing. It's probably _also_ worth doing
something similar for the in-file f_pos thing (ie pass in a copy of f_pos
the same way read/write does these days).
Linus
prev parent reply other threads:[~2004-08-11 3:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-11 2:41 Prasanna Meda
2004-08-11 3:13 ` Linus Torvalds [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=Pine.LNX.4.58.0408102007120.1839@ppc970.osdl.org \
--to=torvalds@osdl.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeda@akamai.com \
/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®