public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sys_sendfile oops in 2.6.13?
@ 2005-10-11  8:56 Grzegorz Nosek
  2005-10-11 14:53 ` Jiri Slaby
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Grzegorz Nosek @ 2005-10-11  8:56 UTC (permalink / raw)
  To: linux-kernel

Hi all

I found an (IMHO) silly bug in do_sendfile in 2.6.13.x kernels (at
least in 2.6.13.3 and .4, didn't backtrack to find where it
originated). Without the patch all I apparently get from sys_sendfile
is an oops due to a call in sys_sendfile with ppos being NULL. With the
patch it works OK. Noticed in vsftpd.

The patch may apply with some fuzz as my kernel is somehwat patched but
the gist of the patch is the same anyway

Regards,
 Grzegorz Nosek

--- linux-2.6/fs/read_write.c~  2005-10-06 21:35:03.000000000 +0200
+++ linux-2.6/fs/read_write.c   2005-10-05 19:14:04.000000000 +0200
@@ -719,7 +719,7 @@
       current->syscr++;
       current->syscw++;

-       if (*ppos > max)
+       if (ppos && *ppos > max)
               retval = -EOVERFLOW;

 fput_out:

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-10-12 22:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-11  8:56 sys_sendfile oops in 2.6.13? Grzegorz Nosek
2005-10-11 14:53 ` Jiri Slaby
2005-10-12  4:00 ` Andy Isaacson
2005-10-12  9:11   ` Grzegorz Nosek
2005-10-12 17:38 ` Chris Wright
2005-10-12 20:06   ` Grzegorz Nosek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox