Merge branch 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull RAS fix from Thomas Gleixner:
"The MCE atomic notifier callchain invokes callbacks which might sleep.

Convert it to a blocking notifier and prevent calls from atomic
context"

* 'ras-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/mce: Make the MCE notifier a blocking one

Changed files
+5 -16
arch
x86
kernel
+1 -1
arch/x86/kernel/cpu/mcheck/mce-genpool.c
··· 85 85 head = llist_reverse_order(head); 86 86 llist_for_each_entry_safe(node, tmp, head, llnode) { 87 87 mce = &node->mce; 88 - atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, mce); 88 + blocking_notifier_call_chain(&x86_mce_decoder_chain, 0, mce); 89 89 gen_pool_free(mce_evt_pool, (unsigned long)node, sizeof(*node)); 90 90 } 91 91 }
+1 -1
arch/x86/kernel/cpu/mcheck/mce-internal.h
··· 13 13 MCE_PANIC_SEVERITY, 14 14 }; 15 15 16 - extern struct atomic_notifier_head x86_mce_decoder_chain; 16 + extern struct blocking_notifier_head x86_mce_decoder_chain; 17 17 18 18 #define ATTR_LEN 16 19 19 #define INITIAL_CHECK_INTERVAL 5 * 60 /* 5 minutes */
+3 -14
arch/x86/kernel/cpu/mcheck/mce.c
··· 123 123 * CPU/chipset specific EDAC code can register a notifier call here to print 124 124 * MCE errors in a human-readable form. 125 125 */ 126 - ATOMIC_NOTIFIER_HEAD(x86_mce_decoder_chain); 126 + BLOCKING_NOTIFIER_HEAD(x86_mce_decoder_chain); 127 127 128 128 /* Do initial initialization of a struct mce */ 129 129 void mce_setup(struct mce *m) ··· 220 220 221 221 WARN_ON(nb->priority > MCE_PRIO_LOWEST && nb->priority < MCE_PRIO_EDAC); 222 222 223 - atomic_notifier_chain_register(&x86_mce_decoder_chain, nb); 223 + blocking_notifier_chain_register(&x86_mce_decoder_chain, nb); 224 224 } 225 225 EXPORT_SYMBOL_GPL(mce_register_decode_chain); 226 226 ··· 228 228 { 229 229 atomic_dec(&num_notifiers); 230 230 231 - atomic_notifier_chain_unregister(&x86_mce_decoder_chain, nb); 231 + blocking_notifier_chain_unregister(&x86_mce_decoder_chain, nb); 232 232 } 233 233 EXPORT_SYMBOL_GPL(mce_unregister_decode_chain); 234 234 ··· 321 321 322 322 static void print_mce(struct mce *m) 323 323 { 324 - int ret = 0; 325 - 326 324 __print_mce(m); 327 - 328 - /* 329 - * Print out human-readable details about the MCE error, 330 - * (if the CPU has an implementation for that) 331 - */ 332 - ret = atomic_notifier_call_chain(&x86_mce_decoder_chain, 0, m); 333 - if (ret == NOTIFY_STOP) 334 - return; 335 - 336 325 pr_emerg_ratelimited(HW_ERR "Run the above through 'mcelog --ascii'\n"); 337 326 } 338 327