Revision d311d79de305f1ada47cadd672e6ed1b28a949eb authored by Al Viro on 09 February 2014, 20:18:09 UTC, committed by Al Viro on 09 February 2014, 20:18:09 UTC
It actually goes back to 2004 ([PATCH] Concurrent O_SYNC write support)
when sync_page_range() had been introduced; generic_file_write{,v}() correctly
synced
	pos_after_write - written .. pos_after_write - 1
but generic_file_aio_write() synced
	pos_before_write .. pos_before_write + written - 1
instead.  Which is not the same thing with O_APPEND, obviously.
A couple of years later correct variant had been killed off when
everything switched to use of generic_file_aio_write().

All users of generic_file_aio_write() are affected, and the same bug
has been copied into other instances of ->aio_write().

The fix is trivial; the only subtle point is that generic_write_sync()
ought to be inlined to avoid calculations useless for the majority of
calls.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 38dbfb5
History
File Mode Size
apparmor
integrity
keys
selinux
smack
tomoyo
yama
Kconfig -rw-r--r-- 5.7 KB
Makefile -rw-r--r-- 973 bytes
capability.c -rw-r--r-- 24.4 KB
commoncap.c -rw-r--r-- 28.1 KB
device_cgroup.c -rw-r--r-- 17.5 KB
inode.c -rw-r--r-- 6.7 KB
lsm_audit.c -rw-r--r-- 9.4 KB
min_addr.c -rw-r--r-- 1.3 KB
security.c -rw-r--r-- 35.6 KB

back to top