On Fri, May 20, 2022 at 03:06:46PM +0800, zhenwei pi wrote: > Introduce memory failure notifier, once hardware memory failure > occurs, after the kernel handles the corrupted page successfully, > someone who registered this chain gets noticed of the corrupted PFN. > > Signed-off-by: zhenwei pi <pizhenwei@xxxxxxxxxxxxx> ... > @@ -1136,6 +1165,10 @@ static void action_result(unsigned long pfn, enum mf_action_page_type type, > num_poisoned_pages_inc(); > pr_err("Memory failure: %#lx: recovery action for %s: %s\n", > pfn, action_page_types[type], action_name[result]); > + > + /* notify the chain if we handle successfully only */ This comment looks somewhat obvious from the code, maybe it's greater to comment about "why" or the intention. Thanks, Naoya Horiguchi > + if (result == MF_RECOVERED) > + blocking_notifier_call_chain(&mf_notifier_list, pfn, NULL); > } > > static int page_action(struct page_state *ps, struct page *p, > -- > 2.20.1