On Tue, Sep 15, 2015 at 02:15:10PM +0100, Daniel Thompson wrote:
Actually it already gets masked out. The argument to raise_nmi() points to a data structure owned by the backtrace library functions and this structure if altered during the execution of nmi_cpu_backtrace() to clear the calling CPU.
I had originally planned to use cpumask_test_and_clear_cpu() for the conditional branch but that would be broken because nmi_cpu_backtrace() would become a nop if we clear anything from the mask before calling it!
I guess I should add a comment about this to save us from broken but "obviously correct" cleanups in the future...
Absolutely.