Merge tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Thomas Gleixner:
"Two fixes for x86:

- Unbreak stack dumps for inactive tasks by interpreting the special
first frame left by __switch_to_asm() correctly.

The recent change not to skip the first frame so ORC and frame
unwinder behave in the same way caused all entries to be
unreliable, i.e. prepended with '?'.

- Use cpumask_available() instead of an implicit NULL check of a
cpumask_var_t in mmio trace to prevent a Clang build warning"

* tag 'x86-urgent-2020-05-24' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks
x86/mmiotrace: Use cpumask_available() for cpumask_var_t variables

Changed files
+9 -2
arch
x86
+7
arch/x86/kernel/unwind_orc.c
··· 320 320 321 321 unsigned long *unwind_get_return_address_ptr(struct unwind_state *state) 322 322 { 323 + struct task_struct *task = state->task; 324 + 323 325 if (unwind_done(state)) 324 326 return NULL; 325 327 326 328 if (state->regs) 327 329 return &state->regs->ip; 330 + 331 + if (task != current && state->sp == task->thread.sp) { 332 + struct inactive_task_frame *frame = (void *)task->thread.sp; 333 + return &frame->ret_addr; 334 + } 328 335 329 336 if (state->sp) 330 337 return (unsigned long *)state->sp - 1;
+2 -2
arch/x86/mm/mmio-mod.c
··· 372 372 int cpu; 373 373 int err; 374 374 375 - if (downed_cpus == NULL && 375 + if (!cpumask_available(downed_cpus) && 376 376 !alloc_cpumask_var(&downed_cpus, GFP_KERNEL)) { 377 377 pr_notice("Failed to allocate mask\n"); 378 378 goto out; ··· 402 402 int cpu; 403 403 int err; 404 404 405 - if (downed_cpus == NULL || cpumask_weight(downed_cpus) == 0) 405 + if (!cpumask_available(downed_cpus) || cpumask_weight(downed_cpus) == 0) 406 406 return; 407 407 pr_notice("Re-enabling CPUs...\n"); 408 408 for_each_cpu(cpu, downed_cpus) {