projects/linux·commit 745ad48e

fix page release issue in filemap_fault

745ad48e · Yan Zheng <[email protected]> · 2007-10-08 10:08:37 -07:00

find_lock_page increases page's usage count, we should decrease it
before return VM_FAULT_SIGBUS

Signed-off-by: Yan Zheng<[email protected]>
Cc: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
745ad48e8cac47beec0b2f72dc3c64424bce1fec
Parents
dd204d63

Changes

1 files changed · +1 −0

FileStatusAddDelContent
mm/filemap.cmodified+1−0View file

mm/filemap.c

View file
diff --git a/mm/filemap.c b/mm/filemap.c
index 90b657b..15c8413 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1388,6 +1388,7 @@ retry_find:
size = (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
if (unlikely(vmf->pgoff >= size)) {
unlock_page(page);
+ page_cache_release(page);
goto outside_data_content;
}