Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232729
b: refs/heads/master
c: efeda7a
h: refs/heads/master
i:
  232727: efb6813
v: v3
  • Loading branch information
Jin Dongming authored and Linus Torvalds committed Feb 3, 2011
1 parent ba2c68e commit d3f5b9e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b16957c643de958ef731c03e0b24c5537490f196
refs/heads/master: efeda7a41e09efce506a68c3549b60b16dd7dedd
30 changes: 28 additions & 2 deletions trunk/mm/memory-failure.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,6 @@ static void collect_procs_anon(struct page *page, struct list_head *to_kill,
struct task_struct *tsk;
struct anon_vma *av;

if (!PageHuge(page) && unlikely(split_huge_page(page)))
return;
read_lock(&tasklist_lock);
av = page_lock_anon_vma(page);
if (av == NULL) /* Not actually mapped anymore */
Expand Down Expand Up @@ -896,6 +894,34 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
}
}

if (PageTransHuge(hpage)) {
/*
* Verify that this isn't a hugetlbfs head page, the check for
* PageAnon is just for avoid tripping a split_huge_page
* internal debug check, as split_huge_page refuses to deal with
* anything that isn't an anon page. PageAnon can't go away fro
* under us because we hold a refcount on the hpage, without a
* refcount on the hpage. split_huge_page can't be safely called
* in the first place, having a refcount on the tail isn't
* enough * to be safe.
*/
if (!PageHuge(hpage) && PageAnon(hpage)) {
if (unlikely(split_huge_page(hpage))) {
/*
* FIXME: if splitting THP is failed, it is
* better to stop the following operation rather
* than causing panic by unmapping. System might
* survive if the page is freed later.
*/
printk(KERN_INFO
"MCE %#lx: failed to split THP\n", pfn);

BUG_ON(!PageHWPoison(p));
return SWAP_FAIL;
}
}
}

/*
* First collect all the processes that have the page
* mapped in dirty form. This has to be done before try_to_unmap,
Expand Down

0 comments on commit d3f5b9e

Please sign in to comment.