PROBLEM: HIGHMEM + munmap problems

From: Tony Zelenoff
Date: Thu Nov 20 2003 - 04:37:11 EST


Hi, All.

PROBLEM: Munmap stands in kernel, when installed 1 Gb of memory (HIGHMEM on)

FULL DESCRIPTION:
I have a module, which allows allocate and lock memory
areas via alloc_page and set_bit(PG_reserved....) in returned
struct. After allocation i map this memory to user space via mmap
call in my module. ( Physical address of pages i get by
phys = ((returned_struct_page - mem_map) << PAGE_SHIFT)

I have a testing program, which:
1. ioctl to module to allocate memory
2. mmap allocated memory to its space
3. fill mmapped memory with some data
4. test data validity
5. unmap memory (via munmap)
6. ioctl to module to free memory

So, when i have 512 Mb installed on my system there are no
problems. But when there are installed 1 Gb (or more) i noticed,
that my test program hangs on munmap call (strace show it). System
works, but in strange way. `ps` or `top` not works. And `reboot` also
hangs. :) But you can do something, because sh works, and other
like `ls` and more...

KERNEL: Linux version 2.4.20-4GB (root@xxxxxxxxxxxxxxx) (gcc version 3.3 20030226 (prerelease) (SuSE Linux))

mem-test.tgz includes all that you need to see that on your machine.
See README to know how to build it.

--
Developer of twoOStwo project.
http://www.parallels.ru/2os2.shtml
--
WBR,
Tony

Attachment: mem_test.tgz
Description: application/compressed