mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
mm/hugetlb.c: avoid double unlock_page() in hugetlb_fault()
commit 1f64d69c7a upstream.
Have hugetlb_fault() call unlock_page(page) only if it had previously
called lock_page(page).
Setting CONFIG_DEBUG_VM=y and then running the libhugetlbfs test suite,
resulted in the tripping of VM_BUG_ON(!PageLocked(page)) in
unlock_page() having been called by hugetlb_fault() when page ==
pagecache_page. This patch remedied the problem.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9b504ae860
commit
befb3a2d67
@@ -2668,7 +2668,8 @@ out_page_table_lock:
|
||||
unlock_page(pagecache_page);
|
||||
put_page(pagecache_page);
|
||||
}
|
||||
unlock_page(page);
|
||||
if (page != pagecache_page)
|
||||
unlock_page(page);
|
||||
|
||||
out_mutex:
|
||||
mutex_unlock(&hugetlb_instantiation_mutex);
|
||||
|
||||
Reference in New Issue
Block a user