summaryrefslogtreecommitdiffstats
path: root/fs/fuse/dir.c
diff options
context:
space:
mode:
authorMaxim Patlasov <MPatlasov@parallels.com>2013-09-13 19:20:16 +0400
committerMiklos Szeredi <mszeredi@suse.cz>2013-09-18 14:19:59 +0200
commit0ab08f576b9e6a6b689fc6b4e632079b978e619b (patch)
tree5256bdda3a818970473c71b33f14bd8564708e14 /fs/fuse/dir.c
parentbde52788bdb755b9e4b75db6c434f30e32a0ca0b (diff)
downloadblackbird-op-linux-0ab08f576b9e6a6b689fc6b4e632079b978e619b.tar.gz
blackbird-op-linux-0ab08f576b9e6a6b689fc6b4e632079b978e619b.zip
fuse: fix fallocate vs. ftruncate race
A former patch introducing FUSE_I_SIZE_UNSTABLE flag provided detailed description of races between ftruncate and anyone who can extend i_size: > 1. As in the previous scenario fuse_dentry_revalidate() discovered that i_size > changed (due to our own fuse_do_setattr()) and is going to call > truncate_pagecache() for some 'new_size' it believes valid right now. But by > the time that particular truncate_pagecache() is called ... > 2. fuse_do_setattr() returns (either having called truncate_pagecache() or > not -- it doesn't matter). > 3. The file is extended either by write(2) or ftruncate(2) or fallocate(2). > 4. mmap-ed write makes a page in the extended region dirty. This patch adds necessary bits to fuse_file_fallocate() to protect from that race. Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/fuse/dir.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud