Quite a lot of places sleep in between the check and the write. It makes
many things much easier (the check could be done just _once_ in the
generic "write()" system call, and not in all the subcalls), but it opens
the window when we thread (this didn't use to be an issue, because we
didn't have threads in the original Linux/i386).
These days, my standpoint is that I refuse to make the kernel more complex
or slower on sane systems just because intel made a major design mistake
in the original i386.
But yes, it _could_ be fixed (for UP, and nobody does SMP on 386's and
stays sane for very long) but I don't have the incentive to fix it (and I
have lots of nice machines that are incentives to _not_ fix it).
Linus