]> git.baikalelectronics.ru Git - kernel.git/commit
fix hugetlb page allocation leak
authorKen Chen <kenchen@google.com>
Tue, 24 Jul 2007 01:44:00 +0000 (18:44 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 24 Jul 2007 19:24:59 +0000 (12:24 -0700)
commit2f15229201ad733cda80370cf0369e7e411ae367
tree82c1fbc5e3a41651d4c0d45cf13d85760708c184
parentf277e169315daa7725eee6faa20ed521d9f98e37
fix hugetlb page allocation leak

dequeue_huge_page() has a serious memory leak upon hugetlb page
allocation.  The for loop continues on allocating hugetlb pages out of
all allowable zone, where this function is supposedly only dequeue one
and only one pages.

Fixed it by breaking out of the for loop once a hugetlb page is found.

Signed-off-by: Ken Chen <kenchen@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c