-
David Howells authored
The attached patch does the following things: (1) It uniquifies permitted overlapping VMAs (eg: MAP_SHARED on chardevs) in nommu_vma_tree. Identical entries break the assumptions on which rbtrees work. Since we don't need to share VMAs in this case, we uniquify such VMAs by using the pointer to the VMA. They're only kept in the tree for /proc/maps visibility. (2) Extracts VMA unlinking into its own function so that the source is adjacent to the VMA linking function. (3) No longer releases memory belonging to a shared chardev or file (the underlying driver is expected to provide mappable memory). (4) Frees the file attached to a VMA whether or not that VMA is shared or is a memory-mapped I/O mapping. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
6fc96ef2