Re: AIC 5.1.18 _broken_

Benjamin LaHaise (kernel@kvack.org)
Sun, 18 Jul 1999 22:55:19 -0400 (EDT)


On Sun, 18 Jul 1999, Linus Torvalds wrote:

> My preferred solution is to just add
>
> if (get_fs() == KERNEL_DS)
> return 0;
>
> at the top of update_vm_cache(). I can't claim that it is much better than
> the update_vm_cache_conditional() version, but it is at least a lot
> simpler. It makes core-file and quota file writing and sendfile() non-
> coherent with mmap. The core-file one is unimportant, the quota file one I
> don't know if anybody cares. The sendfile() case we can document and make
> a feature.

No, that's even worse: it will break anything that does set_fs(KERNEL_DS);
.. sys_write(...); -- like nfsd. Taking Stephen's patch and adding the
KERNEL_DS check against the source address is the simplest thing to do.
The only other approach to fixing it is to make the filesystems write
through the page cache, but that would involve adding a lot more code.

-ben

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