diff options
Diffstat (limited to 'mm/memory-failure.c')
-rw-r--r-- | mm/memory-failure.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c index 99ccb4472623..2b9a5eef39e0 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c | |||
@@ -208,7 +208,7 @@ static int kill_proc_ao(struct task_struct *t, unsigned long addr, int trapno, | |||
208 | * Don't use force here, it's convenient if the signal | 208 | * Don't use force here, it's convenient if the signal |
209 | * can be temporarily blocked. | 209 | * can be temporarily blocked. |
210 | * This could cause a loop when the user sets SIGBUS | 210 | * This could cause a loop when the user sets SIGBUS |
211 | * to SIG_IGN, but hopefully noone will do that? | 211 | * to SIG_IGN, but hopefully no one will do that? |
212 | */ | 212 | */ |
213 | ret = send_sig_info(SIGBUS, &si, t); /* synchronous? */ | 213 | ret = send_sig_info(SIGBUS, &si, t); /* synchronous? */ |
214 | if (ret < 0) | 214 | if (ret < 0) |
@@ -634,7 +634,7 @@ static int me_pagecache_dirty(struct page *p, unsigned long pfn) | |||
634 | * when the page is reread or dropped. If an | 634 | * when the page is reread or dropped. If an |
635 | * application assumes it will always get error on | 635 | * application assumes it will always get error on |
636 | * fsync, but does other operations on the fd before | 636 | * fsync, but does other operations on the fd before |
637 | * and the page is dropped inbetween then the error | 637 | * and the page is dropped between then the error |
638 | * will not be properly reported. | 638 | * will not be properly reported. |
639 | * | 639 | * |
640 | * This can already happen even without hwpoisoned | 640 | * This can already happen even without hwpoisoned |
@@ -728,7 +728,7 @@ static int me_huge_page(struct page *p, unsigned long pfn) | |||
728 | * The table matches them in order and calls the right handler. | 728 | * The table matches them in order and calls the right handler. |
729 | * | 729 | * |
730 | * This is quite tricky because we can access page at any time | 730 | * This is quite tricky because we can access page at any time |
731 | * in its live cycle, so all accesses have to be extremly careful. | 731 | * in its live cycle, so all accesses have to be extremely careful. |
732 | * | 732 | * |
733 | * This is not complete. More states could be added. | 733 | * This is not complete. More states could be added. |
734 | * For any missing state don't attempt recovery. | 734 | * For any missing state don't attempt recovery. |
@@ -945,7 +945,7 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn, | |||
945 | collect_procs(ppage, &tokill); | 945 | collect_procs(ppage, &tokill); |
946 | 946 | ||
947 | if (hpage != ppage) | 947 | if (hpage != ppage) |
948 | lock_page_nosync(ppage); | 948 | lock_page(ppage); |
949 | 949 | ||
950 | ret = try_to_unmap(ppage, ttu); | 950 | ret = try_to_unmap(ppage, ttu); |
951 | if (ret != SWAP_SUCCESS) | 951 | if (ret != SWAP_SUCCESS) |
@@ -1038,7 +1038,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) | |||
1038 | * Check "just unpoisoned", "filter hit", and | 1038 | * Check "just unpoisoned", "filter hit", and |
1039 | * "race with other subpage." | 1039 | * "race with other subpage." |
1040 | */ | 1040 | */ |
1041 | lock_page_nosync(hpage); | 1041 | lock_page(hpage); |
1042 | if (!PageHWPoison(hpage) | 1042 | if (!PageHWPoison(hpage) |
1043 | || (hwpoison_filter(p) && TestClearPageHWPoison(p)) | 1043 | || (hwpoison_filter(p) && TestClearPageHWPoison(p)) |
1044 | || (p != hpage && TestSetPageHWPoison(hpage))) { | 1044 | || (p != hpage && TestSetPageHWPoison(hpage))) { |
@@ -1088,7 +1088,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) | |||
1088 | * It's very difficult to mess with pages currently under IO | 1088 | * It's very difficult to mess with pages currently under IO |
1089 | * and in many cases impossible, so we just avoid it here. | 1089 | * and in many cases impossible, so we just avoid it here. |
1090 | */ | 1090 | */ |
1091 | lock_page_nosync(hpage); | 1091 | lock_page(hpage); |
1092 | 1092 | ||
1093 | /* | 1093 | /* |
1094 | * unpoison always clear PG_hwpoison inside page lock | 1094 | * unpoison always clear PG_hwpoison inside page lock |
@@ -1130,7 +1130,7 @@ int __memory_failure(unsigned long pfn, int trapno, int flags) | |||
1130 | 1130 | ||
1131 | /* | 1131 | /* |
1132 | * Now take care of user space mappings. | 1132 | * Now take care of user space mappings. |
1133 | * Abort on fail: __remove_from_page_cache() assumes unmapped page. | 1133 | * Abort on fail: __delete_from_page_cache() assumes unmapped page. |
1134 | */ | 1134 | */ |
1135 | if (hwpoison_user_mappings(p, pfn, trapno) != SWAP_SUCCESS) { | 1135 | if (hwpoison_user_mappings(p, pfn, trapno) != SWAP_SUCCESS) { |
1136 | printk(KERN_ERR "MCE %#lx: cannot unmap page, give up\n", pfn); | 1136 | printk(KERN_ERR "MCE %#lx: cannot unmap page, give up\n", pfn); |
@@ -1231,7 +1231,7 @@ int unpoison_memory(unsigned long pfn) | |||
1231 | return 0; | 1231 | return 0; |
1232 | } | 1232 | } |
1233 | 1233 | ||
1234 | lock_page_nosync(page); | 1234 | lock_page(page); |
1235 | /* | 1235 | /* |
1236 | * This test is racy because PG_hwpoison is set outside of page lock. | 1236 | * This test is racy because PG_hwpoison is set outside of page lock. |
1237 | * That's acceptable because that won't trigger kernel panic. Instead, | 1237 | * That's acceptable because that won't trigger kernel panic. Instead, |