aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/net_dropmonitor.py
diff options
context:
space:
mode:
authorDavid Howells <[email protected]>2009-09-05 11:17:07 -0700
committerLinus Torvalds <[email protected]>2009-09-05 11:30:42 -0700
commita190887b58c32d19c2eee007c5eb8faa970a69ba (patch)
treedeff588d04f3e42662484b0281e1beceb3cf9f4e /tools/perf/scripts/python/net_dropmonitor.py
parent4e49627b9bc29a14b393c480e8c979e3bc922ef7 (diff)
nommu: fix error handling in do_mmap_pgoff()
Fix the error handling in do_mmap_pgoff(). If do_mmap_shared_file() or do_mmap_private() fail, we jump to the error_put_region label at which point we cann __put_nommu_region() on the region - but we haven't yet added the region to the tree, and so __put_nommu_region() may BUG because the region tree is empty or it may corrupt the region tree. To get around this, we can afford to add the region to the region tree before calling do_mmap_shared_file() or do_mmap_private() as we keep nommu_region_sem write-locked, so no-one can race with us by seeing a transient region. Signed-off-by: David Howells <[email protected]> Acked-by: Pekka Enberg <[email protected]> Acked-by: Paul Mundt <[email protected]> Cc: Mel Gorman <[email protected]> Acked-by: Greg Ungerer <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/net_dropmonitor.py')
0 files changed, 0 insertions, 0 deletions