mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: chris@scary.beasts.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Nasty 2.6 sendfile() bug / regression; affects vsftpd
Date: Sat, 17 Apr 2004 20:12:23 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0404172005260.23917@ppc970.osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.58.0404180026490.16486@sphinx.mythic-beasts.com>



On Sun, 18 Apr 2004 chris@scary.beasts.org wrote:
> 
> Any chance you can review this and sneak into 2.6.soon?

Your patch is horribly ugly. How about this (much simpler) patch instead?

It just sets the "max" to zero if pos in NULL in the caller. That just 
seems a much better/saner approach.

Can you test that this one-liner fixes the issue for you?

		Linus

----
--- 1.37/fs/read_write.c	Mon Apr 12 10:54:20 2004
+++ edited/fs/read_write.c	Sat Apr 17 20:09:41 2004
@@ -635,7 +635,7 @@
 		return ret;
 	}
 
-	return do_sendfile(out_fd, in_fd, NULL, count, MAX_NON_LFS);
+	return do_sendfile(out_fd, in_fd, NULL, count, 0);
 }
 
 asmlinkage ssize_t sys_sendfile64(int out_fd, int in_fd, loff_t __user *offset, size_t count)

  reply	other threads:[~2004-04-18  3:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18  0:28 chris
2004-04-18  3:12 ` Linus Torvalds [this message]
2004-04-18 13:49   ` chris
2004-04-19  0:46   ` Jamie Lokier
2004-04-19  5:28     ` Linus Torvalds
2004-04-19  9:44       ` [PATCH] Add 64-bit get_user and __get_user for i386 Jamie Lokier
2004-04-19 10:14         ` Jamie Lokier
2004-04-19 10:17           ` [PATCH] Use get_user for 64-bit read in sendfile64 Jamie Lokier
2004-04-19 10:36             ` Jamie Lokier
2004-04-19 14:56         ` [PATCH] Add 64-bit get_user and __get_user for i386 Linus Torvalds
     [not found]           ` <20040420020922.GA18348@mail.shareable.org>
     [not found]             ` <Pine.LNX.4.58.0404191945490.29941@ppc970.osdl.org>
2004-04-20 17:41               ` Jamie Lokier
2004-04-21  1:15                 ` Linus Torvalds
2004-04-20 23:21             ` Jim Wilson

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.0404172005260.23917@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=akpm@osdl.org \
    --cc=chris@scary.beasts.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®