Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 745ad48e authored by Yan Zheng's avatar Yan Zheng Committed by Linus Torvalds
Browse files

fix page release issue in filemap_fault



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

Signed-off-by: default avatarYan <Zheng&lt;yanzheng@21cn.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent dd204d63
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1388,6 +1388,7 @@ int filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
	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;
	}