mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
pmm: fix page cache takepage retry memory leak
This commit is contained in:
@@ -180,6 +180,7 @@ void *pmm_allocpage(int section) {
|
|||||||
|
|
||||||
if (cachepage && vmmcache_takepage(page) == EAGAIN) {
|
if (cachepage && vmmcache_takepage(page) == EAGAIN) {
|
||||||
// someone already got the page from the cache between us holding it and taking it
|
// someone already got the page from the cache between us holding it and taking it
|
||||||
|
pmm_release(pmm_getpageaddress(page));
|
||||||
page = NULL;
|
page = NULL;
|
||||||
// retry it from the start, as an anonymous page could have been released while the lock was not held
|
// retry it from the start, as an anonymous page could have been released while the lock was not held
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|||||||
Reference in New Issue
Block a user