diff options
author | Mel Gorman <mel@csn.ul.ie> | 2009-12-15 02:59:53 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 17:53:23 +0100 |
commit | 4eb2b1dcd598f8489130405c81c60c289896d92a (patch) | |
tree | 87bf0dec35f55688595447de65eb95952eb3dabc /fs/omfs | |
parent | 'sysctl_max_map_count' should be non-negative (diff) | |
download | linux-4eb2b1dcd598f8489130405c81c60c289896d92a.tar.xz linux-4eb2b1dcd598f8489130405c81c60c289896d92a.zip |
hugetlb: acquire the i_mmap_lock before walking the prio_tree to unmap a page
When the owner of a mapping fails COW because a child process is holding a
reference, the children VMAs are walked and the page is unmapped. The
i_mmap_lock is taken for the unmapping of the page but not the walking of
the prio_tree. In theory, that tree could be changing if the lock is not
held. This patch takes the i_mmap_lock properly for the duration of the
prio_tree walk.
[hugh.dickins@tiscali.co.uk: Spotted the problem in the first place]
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/omfs')
0 files changed, 0 insertions, 0 deletions