Re: sys_write() racy for multi-threaded append?

From: Alan Cox
Date: Thu Mar 08 2007 - 18:39:52 EST


> Surely that's racy when two threads write to the same fd and the first
> vfs_write call blocks or is preempted. Or does fget_light take some
> per-file lock that I'm not seeing?

I think you are making assumptions about file position behaviour that are
simply not guaranteed in the standards document.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/