@@ -956,7 +956,7 @@ static const char * const action_page_types[] = {
956956 [MF_MSG_BUDDY ] = "free buddy page" ,
957957 [MF_MSG_DAX ] = "dax page" ,
958958 [MF_MSG_UNSPLIT_THP ] = "unsplit thp" ,
959- [MF_MSG_ALREADY_POISONED ] = "already poisoned" ,
959+ [MF_MSG_ALREADY_POISONED ] = "already poisoned page " ,
960960 [MF_MSG_UNKNOWN ] = "unknown page" ,
961961};
962962
@@ -1349,9 +1349,10 @@ static int action_result(unsigned long pfn, enum mf_action_page_type type,
13491349{
13501350 trace_memory_failure_event (pfn , type , result );
13511351
1352- num_poisoned_pages_inc (pfn );
1353-
1354- update_per_node_mf_stats (pfn , result );
1352+ if (type != MF_MSG_ALREADY_POISONED ) {
1353+ num_poisoned_pages_inc (pfn );
1354+ update_per_node_mf_stats (pfn , result );
1355+ }
13551356
13561357 pr_err ("%#lx: recovery action for %s: %s\n" ,
13571358 pfn , action_page_types [type ], action_name [result ]);
@@ -2094,12 +2095,11 @@ static int try_memory_failure_hugetlb(unsigned long pfn, int flags, int *hugetlb
20942095 * hugetlb = 0 ;
20952096 return 0 ;
20962097 } else if (res == - EHWPOISON ) {
2097- pr_err ("%#lx: already hardware poisoned\n" , pfn );
20982098 if (flags & MF_ACTION_REQUIRED ) {
20992099 folio = page_folio (p );
21002100 res = kill_accessing_process (current , folio_pfn (folio ), flags );
2101- action_result (pfn , MF_MSG_ALREADY_POISONED , MF_FAILED );
21022101 }
2102+ action_result (pfn , MF_MSG_ALREADY_POISONED , MF_FAILED );
21032103 return res ;
21042104 } else if (res == - EBUSY ) {
21052105 if (!(flags & MF_NO_RETRY )) {
@@ -2285,7 +2285,6 @@ int memory_failure(unsigned long pfn, int flags)
22852285 goto unlock_mutex ;
22862286
22872287 if (TestSetPageHWPoison (p )) {
2288- pr_err ("%#lx: already hardware poisoned\n" , pfn );
22892288 res = - EHWPOISON ;
22902289 if (flags & MF_ACTION_REQUIRED )
22912290 res = kill_accessing_process (current , pfn , flags );
0 commit comments