I was just following the semantics of the original code. -EOVERFLOW
checks are certainly doable; I'll post an update in a bit.
> + }
> + ret = common_sendfile(out_fd, in_fd, ppos, count);
> + if (offset)
> + put_user((off_t)pos, offset);
> + return ret;
>
> What is another thread unmapped 'offset' during the system call? Do
> we want to check the result of put_user here and return -EFAULT?
> (If so, there are other system calls to consider such as select).
Again, the original code didn't bother checking. As far as how it
should work, I'd rather send a segv to the app as otherwise it is
impossible to determine how much data was actually transferred.
-ben
-
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/