kernel-hacking-2024-linux-s.../fs
Linus Torvalds efc968d450 Don't allow splice() to files opened with O_APPEND
This is debatable, but while we're debating it, let's disallow the
combination of splice and an O_APPEND destination.

It's not entirely clear what the semantics of O_APPEND should be, and
POSIX apparently expects pwrite() to ignore O_APPEND, for example.  So
we could make up any semantics we want, including the old ones.

But Miklos convinced me that we should at least give it some thought,
and that accepting writes at arbitrary offsets is wrong at least for
IS_APPEND() files (which always have O_APPEND set, even if the reverse
isn't true: you can obviously have O_APPEND set on a regular file).

So disallow O_APPEND entirely for now.  I doubt anybody cares, and this
way we have one less gray area to worry about.

Reported-and-argued-for-by: Miklos Szeredi <miklos@szeredi.hu>
Acked-by: Jens Axboe <ens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-09 14:26:38 -07:00
..
9p 9p: use an IS_ERR test rather than a NULL test 2008-09-24 16:22:22 -05:00
adfs [PATCH] fix ->llseek() for a bunch of directories 2008-08-25 01:18:09 -04:00
affs [PATCH] fix ->llseek() for a bunch of directories 2008-08-25 01:18:09 -04:00
afs mm: rename page trylock 2008-08-04 21:31:34 -07:00
autofs
autofs4 [PATCH] fix ->llseek() for a bunch of directories 2008-08-25 01:18:09 -04:00
befs [PATCH] fix ->llseek() for a bunch of directories 2008-08-25 01:18:09 -04:00
bfs bfs: fix Lockdep warning 2008-09-13 14:41:51 -07:00
cifs [CIFS] Turn off Unicode during session establishment for plaintext authentication 2008-08-28 15:32:22 +00:00
coda
configfs [PATCH] configfs: Consolidate locking around configfs_detach_prep() in configfs_rmdir() 2008-08-22 11:09:02 -07:00
cramfs cramfs: fix named-pipe handling 2008-08-20 15:40:32 -07:00
debugfs
devpts [PATCH] devpts: switch to IDA 2008-08-01 11:25:29 -04:00
dlm dlm: rename structs 2008-08-13 12:47:36 -05:00
ecryptfs eCryptfs: use page_alloc not kmalloc to get a page of memory 2008-07-28 16:30:21 -07:00
efs [PATCH] fix efs_lookup() 2008-08-25 01:18:04 -04:00
exportfs
ext2 vfs: pagecache usage optimization for pagesize!=blocksize 2008-07-28 16:30:21 -07:00
ext3 [PATCH] fix races and leaks in vfs_quota_on() users 2008-08-01 11:25:25 -04:00
ext4 ext4: Initialize writeback_index to 0 when allocating a new inode 2008-08-19 21:14:52 -04:00
fat vfat: fix 'sync' mount deadlock due to BKL->lock_super conversion 2008-08-20 08:31:19 -07:00
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd Merge branch 'core/locking' into core/urgent 2008-08-12 00:11:49 +02:00
jbd2 Merge branch 'core/locking' into core/urgent 2008-08-12 00:11:49 +02:00
jffs2 removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
jfs
lockd Merge branch 'for-2.6.27' of git://linux-nfs.org/~bfields/linux 2008-08-12 16:39:22 -07:00
minix
msdos
ncpfs
nfs NFS: Restore missing hunk in NFS mount option parser 2008-09-08 15:35:19 -07:00
nfs_common
nfsd nfsd: fix buffer overrun decoding NFSv4 acl 2008-09-01 14:24:24 -04:00
nls
ntfs NTFS: update homepage 2008-09-02 19:21:37 -07:00
ocfs2 ocfs2: Fix a bug in direct IO read. 2008-09-10 01:44:08 -07:00
omfs omfs: fix oops when file metadata is corrupted 2008-08-15 08:35:44 -07:00
openpromfs
partitions rescan_partitions(): make device capacity errors non-fatal 2008-09-13 14:41:52 -07:00
proc mm: ifdef Quicklists in /proc/meminfo 2008-09-13 14:41:51 -07:00
qnx4
ramfs mm: tiny-shmem nommu fix 2008-10-02 15:53:13 -07:00
reiserfs reiserfs: removed duplicated #include 2008-08-12 16:07:30 -07:00
romfs romfs_readpage: don't report errors for pages beyond i_size 2008-07-30 14:30:34 -07:00
smbfs
sysfs
sysv
ubifs UBIFS: fix printk format warnings 2008-09-18 09:57:57 +03:00
udf udf: add llseek method 2008-09-08 20:31:04 +02:00
ufs Revert "UFS: add const to parser token table" 2008-08-04 16:50:38 -07:00
vfat
xfs [XFS] Remove xfs_iext_irec_compact_full() 2008-09-26 12:17:57 +10:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c binfmt_elf_fdpic: Magical stack pointer index, for NEW_AUX_ENT compat. 2008-07-28 18:10:28 +09:00
binfmt_em86.c
binfmt_flat.c binfmt_flat: Stub in a FLAT_PLAT_INIT(). 2008-08-11 20:17:55 +09:00
binfmt_misc.c binfmt_misc: fix false -ENOEXEC when coupled with other binary handlers 2008-08-20 15:40:31 -07:00
binfmt_script.c
binfmt_som.c
bio-integrity.c bio-integrity: remove EXPORT_SYMBOL for bio_integrity_init_slab() 2008-07-28 16:30:21 -07:00
bio.c bio: fix __bio_copy_iov() handling of bio->bv_len 2008-08-27 09:50:19 +02:00
block_dev.c [PATCH] switch mtd and dm-table to lookup_bdev() 2008-08-01 11:25:31 -04:00
buffer.c block: submit_bh() inadvertently discards barrier flag on a sync write 2008-08-27 09:50:19 +02:00
char_dev.c
compat.c [PATCH] fix regular readdir() and friends 2008-08-25 01:18:08 -04:00
compat_binfmt_elf.c
compat_ioctl.c
dcache.c Fix NULL pointer dereference in proc_sys_compare 2008-09-29 07:42:57 -07:00
dcookies.c
direct-io.c
dnotify.c
dquot.c [PATCH] fix races and leaks in vfs_quota_on() users 2008-08-01 11:25:25 -04:00
drop_caches.c
eventfd.c
eventpoll.c fs/eventpoll.c: fix sys_epoll_create1() comment 2008-08-12 16:07:30 -07:00
exec.c mm owner: fix race between swapoff and exit 2008-09-29 08:41:47 -07:00
fcntl.c [PATCH] clean dup2() up a bit 2008-08-01 11:25:24 -04:00
fifo.c
file.c [PATCH] merge locate_fd() and get_unused_fd() 2008-08-01 11:25:23 -04:00
file_table.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c fs/inode.c: properly init address_space->writeback_index 2008-08-15 08:35:44 -07:00
inotify.c
inotify_user.c inotify: fix lock ordering wrt do_page_fault's mmap_sem 2008-10-02 15:53:13 -07:00
internal.h
ioctl.c
ioprio.c fix setpriority(PRIO_PGRP) thread iterator breakage 2008-08-20 15:40:32 -07:00
Kconfig [CIFS] Reorder cifs config item for better clarity 2008-08-26 18:32:28 +00:00
Kconfig.binfmt sh: Initial ELF FDPIC support. 2008-07-28 18:10:28 +09:00
libfs.c VFS: increase pseudo-filesystem block size to PAGE_SIZE 2008-07-30 09:41:44 -07:00
locks.c
Makefile
mbcache.c
mpage.c
namei.c [patch 3/4] vfs: remove unused nameidata argument of may_create() 2008-08-01 11:25:30 -04:00
namespace.c [PATCH] pass struct path * to do_add_mount() 2008-08-01 11:25:32 -04:00
nfsctl.c
no-block.c
open.c [PATCH] merge locate_fd() and get_unused_fd() 2008-08-01 11:25:23 -04:00
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
read_write.h
readdir.c [PATCH] fix regular readdir() and friends 2008-08-25 01:18:08 -04:00
select.c
seq_file.c [PATCH] deal with the first call of ->show() generating no output 2008-08-25 01:18:10 -04:00
signalfd.c
splice.c Don't allow splice() to files opened with O_APPEND 2008-10-09 14:26:38 -07:00
stack.c
stat.c
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c