[PATCH][REVISED] mspec: handle shrinking virtual memory areas

2007-09-12 Thread Cliff Wickman
Version 2: refcount maintained as atomic_t (as before the version 1 patch) (Diffed against 2.6.23-rc5, not "2.6.13-rc5" !) The shrinking of a virtual memory area that is mmap(2)'d to a memory special file (device drivers/char/mspec.c) can cause a panic. If the mapped size of the vma (

[PATCH][REVISED] mspec: handle shrinking virtual memory areas

2007-09-12 Thread Cliff Wickman
Version 2: refcount maintained as atomic_t (as before the version 1 patch) The shrinking of a virtual memory area that is mmap(2)'d to a memory special file (device drivers/char/mspec.c) can cause a panic. If the mapped size of the vma (vm_area_struct) is very large, mspec allocates a large vma_