projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66e13e6
)
hugetlb: release pages in the error path of hugetlb_cow()
author
Hillf Danton
<
[email protected]
>
Tue, 15 Nov 2011 22:36:12 +0000
(14:36 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 16 Nov 2011 00:41:52 +0000
(22:41 -0200)
If we fail to prepare an anon_vma, the {new, old}_page should be released,
or they will leak.
Signed-off-by: Hillf Danton <
[email protected]
>
Reviewed-by: Andrea Arcangeli <
[email protected]
>
Cc: Hugh Dickins <
[email protected]
>
Cc: Johannes Weiner <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/hugetlb.c
patch
|
blob
|
history
diff --git
a/mm/hugetlb.c
b/mm/hugetlb.c
index dae27ba3be2c8523cd032ad330e2f5a32fbffaf3..bb28a5f9db8ddbf2f65391fe9206ca99b46a256b 100644
(file)
--- a/
mm/hugetlb.c
+++ b/
mm/hugetlb.c
@@
-2422,6
+2422,8
@@
retry_avoidcopy:
* anon_vma prepared.
*/
if (unlikely(anon_vma_prepare(vma))) {
+ page_cache_release(new_page);
+ page_cache_release(old_page);
/* Caller expects lock to be held */
spin_lock(&mm->page_table_lock);
return VM_FAULT_OOM;