Commit 15b1d321 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Fix futexes in hugetlb pages

There is a stunning bug.
parent 050e6ae5
...@@ -231,8 +231,8 @@ static inline void get_page(struct page *page) ...@@ -231,8 +231,8 @@ static inline void get_page(struct page *page)
static inline void put_page(struct page *page) static inline void put_page(struct page *page)
{ {
if (PageCompound(page)) { if (PageCompound(page)) {
if (put_page_testzero(page)) {
page = (struct page *)page->lru.next; page = (struct page *)page->lru.next;
if (put_page_testzero(page)) {
if (page->lru.prev) { /* destructor? */ if (page->lru.prev) { /* destructor? */
(*(void (*)(struct page *))page->lru.prev)(page); (*(void (*)(struct page *))page->lru.prev)(page);
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment