aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.h
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2014-06-23 13:22:06 -0700
committerBen Hutchings <ben@decadent.org.uk>2014-08-06 18:07:40 +0100
commitf159cc257190477cece829606cfb879612f52f2c (patch)
tree45de8ce87d659165ec9b71911c253545a11e642e /kernel/audit.h
parentd9892580a2f3aa0d369fcec9bd50fd75ecc57dcc (diff)
downloadkernel_samsung_smdk4412-f159cc257190477cece829606cfb879612f52f2c.zip
kernel_samsung_smdk4412-f159cc257190477cece829606cfb879612f52f2c.tar.gz
kernel_samsung_smdk4412-f159cc257190477cece829606cfb879612f52f2c.tar.bz2
shmem: fix faulting into a hole while it's punched
commit f00cdc6df7d7cfcabb5b740911e6788cb0802bdb upstream. Trinity finds that mmap access to a hole while it's punched from shmem can prevent the madvise(MADV_REMOVE) or fallocate(FALLOC_FL_PUNCH_HOLE) from completing, until the reader chooses to stop; with the puncher's hold on i_mutex locking out all other writers until it can complete. It appears that the tmpfs fault path is too light in comparison with its hole-punching path, lacking an i_data_sem to obstruct it; but we don't want to slow down the common case. Extend shmem_fallocate()'s existing range notification mechanism, so shmem_fault() can refrain from faulting pages into the hole while it's punched, waiting instead on i_mutex (when safe to sleep; or repeatedly faulting when not). [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Hugh Dickins <hughd@google.com> Reported-by: Sasha Levin <sasha.levin@oracle.com> Tested-by: Sasha Levin <sasha.levin@oracle.com> Cc: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'kernel/audit.h')
0 files changed, 0 insertions, 0 deletions