Re: FW: Linux kernel file offset pointer races

Linus Torvalds
2004-08-09T17:25:18Z

On Mon, 9 Aug 2004, Jonathan Corbet wrote:
>
> This (along with the bits which have just gone into BK) hints at a
> driver API change. Inquiring minds are *very* curious about such things
> at the moment... will there be a file_operations method prototype
> change associated with the file offset fixes?

No, it's all just building up to the kernel internally always using a
pread/pwrite-like thing to the drivers, and then maintaining f_pos
entirely in the VFS layer. All the VFS interfaces do this already (since
that is how the user-visible pread/pwrite works).

But a few drivers are buggy (they access f_pos directly even if it was a
user-level pread/pwrite), and in particular the /proc sysctl interface was
totally broken this way.

So I've fixed the sysctl code - that _did_ require a prototype change, but
wasn't horribly painful, and am going through drivers..

Linus