lkml.org 
[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: sys_sendfile oops in 2.6.13?
Grzegorz Nosek napsal(a):

>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)
>
>
I don't know the code surrounding this, but shouldn't be this
(!ppos || *ppos > max)?

> retval = -EOVERFLOW;
>
> fput_out:
>
>
--
js

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-11 16:56    [W:0.039 / U:2.148 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site