Re: EFAULT from file read.

Alexander Viro (viro@math.psu.edu)
Tue, 18 Sep 2001 09:04:57 -0400 (EDT)


On Tue, 18 Sep 2001, Richard B. Johnson wrote:

> File I/O requires a process context. Your file descriptor means
> nothing unless associated with the process that opened the file.

It fscking doesn't. He had clearly said that he calls file->f_op->read(),
which has nothing whatsofuckingever to descriptors. Sod off and don't
return until you learn to read.

As for the original question - grep fro set_fs and you'll see what to
do (basically, set_fs(KERNEL_DS) before the call of ->read() and restore
afterwards).

-
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/