bfeb73e850
mmap establish a mapping address space that refer to a tmpfs file, there are two issues: 1. if the tmpfs file is removed and a subsequent close(), tmpfs_close will release the backend memory object, use after free errors occur when operating the mapping memory. We add an extra reference to memory object, memory will be released when there are no more mappings. 2. if unmap only a portion of the memory, fix the bug that adds another map. Use realloc and shrink the mapping memory instead. The fix pass LTP posix case mmap/10-1.c and mmap/12-1.c Signed-off-by: fangxinyong <fangxinyong@xiaomi.com> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
Make.defs | ||
fs_tmpfs.c | ||
fs_tmpfs.h |