aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorJan Kara <[email protected]>2012-06-12 14:20:37 +0000
committerAl Viro <[email protected]>2012-07-31 05:45:47 +0000
commit14da9200140f8d722ad1767dfabadebd8b34f2ad (patch)
treeea5d88b091999f7a64af0b9d335d7cad4c79edfb /net/unix/af_unix.c
parentfs: Skip atime update on frozen filesystem (diff)
downloadkernel-14da9200140f8d722ad1767dfabadebd8b34f2ad.tar.gz
kernel-14da9200140f8d722ad1767dfabadebd8b34f2ad.zip
fs: Protect write paths by sb_start_write - sb_end_write
There are several entry points which dirty pages in a filesystem. mmap (handled by block_page_mkwrite()), buffered write (handled by __generic_file_aio_write()), splice write (generic_file_splice_write), truncate, and fallocate (these can dirty last partial page - handled inside each filesystem separately). Protect these places with sb_start_write() and sb_end_write(). ->page_mkwrite() calls are particularly complex since they are called with mmap_sem held and thus we cannot use standard sb_start_write() due to lock ordering constraints. We solve the problem by using a special freeze protection sb_start_pagefault() which ranks below mmap_sem. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <[email protected]> Tested-by: Peter M. Petrakis <[email protected]> Tested-by: Dann Frazier <[email protected]> Tested-by: Massimo Morana <[email protected]> Signed-off-by: Jan Kara <[email protected]> Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions