lkml.org 
[lkml]   [2005]   [Nov]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
FromHerbert Xu <>
SubjectRe: do_sendfile ppos check ...
DateFri, 04 Nov 2005 13:36:36 +1100
Herbert Poetzl <herbert@13thfloor.at> wrote:
> 
> which passes ppos as NULL, which in turn leads to an oops ...

But do_sendfile will set ppos to &in_file->f_pos if it's NULL.
Why isn't that working?

> @@ -731,7 +731,8 @@ asmlinkage ssize_t sys_sendfile(int out_
>                return ret;
>        }
> 
> -       return do_sendfile(out_fd, in_fd, NULL, count, 0);
> +       pos = 0;
> +       return do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS);
> }

The last argument is meant to be zero if you check the history.

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
-
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-11-04 03:39    [from the cache]
©2003-2008