cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3)
Jeff Layton authored

This is more or less the same patch as before, but with some merge
conflicts fixed up.

If a process has a dirty page mapped into its page tables, then it has
the ability to change it while the client is trying to write the data
out to the server. If that happens after the signature has been
calculated then that signature will then be wrong, and the server will
likely reset the TCP connection.

This patch adds a page_mkwrite handler for CIFS that simply takes the
page lock. Because the page lock is held over the life of writepage and
writepages, this prevents the page from becoming writeable until
the write call has completed.

With this, we can also remove the "sign_zero_copy" module option and
always inline the pages when writing.
Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
ca83ce3d
Name Last commit Last update
..
9p userns: rename is_owner_or_cap to inode_owner_or_capable
adfs Fix common misspellings
affs Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block
afs Fix common misspellings
autofs4 Fix common misspellings
befs Fix common misspellings
bfs Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block
btrfs Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
cachefiles Fix common misspellings
ceph Merge branch 'for-linus2' of git://git.profusion.mobi/users/lucas/linux-2.6
cifs cifs: don't allow mmap'ed pages to be dirtied while under writeback (try #3)
coda codafs: fix build break when CONFIG_PROC_SYSCTL=n
configfs Fix common misspellings
cramfs cramfs: generate unique inode number for better inode cache usage
debugfs debugfs: Fix filesystem reference counting on debugfs_remove() failure
devpts fs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()
dlm Fix common misspellings
ecryptfs Fix common misspellings
efs block: remove per-queue plugging
exofs Fix common misspellings
exportfs vfs: Add open by file handle support
ext2 Fix common misspellings
ext3 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6
ext4 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
fat Merge branch 'for-2.6.39/core' of git://git.kernel.dk/linux-2.6-block
freevxfs
fscache
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2
jfs
lockd
logfs
minix
ncpfs
nfs
nfs_common
nfsd
nilfs2
nls
notify
ntfs
ocfs2
omfs
openpromfs
partitions
proc
pstore
qnx4
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
ubifs
udf
ufs
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fhandle.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
fs_struct.c
generic_acl.c
inode.c
internal.h
ioctl.c
ioprio.c
libfs.c
locks.c
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c
utimes.c
xattr.c
xattr_acl.c