summaryrefslogtreecommitdiff
path: root/fs/jfs/jfs_txnmgr.h
diff options
context:
space:
mode:
authorVladimir Davydov <vdavydov@parallels.com>2014-08-09 01:22:01 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-09 02:57:23 +0400
commit4f7d461433bb4a4deee61baefdac6cd1a1ecb546 (patch)
treefe3609c5e750d4a06876f61ab217503e56b4e182 /fs/jfs/jfs_txnmgr.h
parentce65cefa5debefc0e81d0a533bda467f0aa67350 (diff)
downloadlinux-4f7d461433bb4a4deee61baefdac6cd1a1ecb546.tar.xz
fork: copy mm's vm usage counters under mmap_sem
If a forking process has a thread calling (un)mmap (silly but still), the child process may have some of its mm's vm usage counters (total_vm and friends) screwed up, because currently they are copied from oldmm w/o holding any locks (memcpy in dup_mm). This patch moves the counters initialization to dup_mmap() to be called under oldmm->mmap_sem, which eliminates any possibility of race. Signed-off-by: Vladimir Davydov <vdavydov@parallels.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Christoph Lameter <cl@linux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/jfs/jfs_txnmgr.h')
0 files changed, 0 insertions, 0 deletions