mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-04 09:50:14 -05:00
mm/hugetlb.c: add missing spin_lock() to hugetlb_cow()
Add missing spin_lock() of the page_table_lock before an error return in hugetlb_cow(). Callers of hugtelb_cow() expect it to be held upon return. Signed-off-by: Dean Nelson <[email protected]> Cc: Mel Gorman <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
70384dc6dc
commit
44e2aa937e
1 changed files with 4 additions and 1 deletions
|
|
@ -2448,8 +2448,11 @@ retry_avoidcopy:
|
|||
* When the original hugepage is shared one, it does not have
|
||||
* anon_vma prepared.
|
||||
*/
|
||||
if (unlikely(anon_vma_prepare(vma)))
|
||||
if (unlikely(anon_vma_prepare(vma))) {
|
||||
/* Caller expects lock to be held */
|
||||
spin_lock(&mm->page_table_lock);
|
||||
return VM_FAULT_OOM;
|
||||
}
|
||||
|
||||
copy_user_huge_page(new_page, old_page, address, vma);
|
||||
__SetPageUptodate(new_page);
|
||||
|
|
|
|||
Loading…
Reference in a new issue