Re: Regression with orderly_poweroff()

From: Andi Kleen
Date: Tue Mar 12 2013 - 16:13:58 EST


> Btw. There is another "strange" user, arch/x86/kernel/cpu/mcheck/mce.c.
> It uses mce_trigger_work to call call_usermodehelper(UMH_NO_WAIT).
> Why? UMH_NO_WAIT is already atomic. And the !work_pending() check is
> confusing, schedule_work(schedule_work) checks it is not pending.

I think you're right, the additional step shouldn't be needed.

The MCE Handler uses the trick to do this in MCE context if the
interrupts were enabled earlier.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/