Re: [PATCH 1/8] x86, mce: stop calling del_timer_sync() from interrupt

From: Hidetoshi Seto
Date: Mon Jun 20 2011 - 00:48:19 EST

(2011/06/17 22:56), Borislav Petkov wrote:
> On Fri, Jun 17, 2011 at 04:40:36AM -0400, Hidetoshi Seto wrote:
>> Function del_timer_sync() has WARN_ON(in_irq()) in it because
>> calling it from interrupt context can cause deadlock if it
>> interrupts the target timer running.
> No need to explain the del_timer_sync() code here - just say that it's
> not allowed to call it from an IRQ context.

I'd like to add "why not allowed" in brief too...
Anyway I'll update the patch description and make it short.

>> only few MCE geeks experience this warning on write.
> MCE geeks ??? I wonder who those are :-)

I'm just joking ;-)

>> +/* Must not be called from interrupt where del_timer_sync() can deadlock */
>> +static void mce_timer_delete_all(void)
>> +{
>> + int cpu;
>> +
>> + for_each_online_cpu(cpu) {
>> + if (mce_available(&per_cpu(cpu_info, cpu)))
>> + del_timer_sync(&per_cpu(mce_timer, cpu));
>> + }
>> +}
> You're adding the mce_available(..) check just to remove it in the next
> patch. Since all those sysfs nodes are behind such a check, there's no
> need for it here too.

Maybe it would be better to change the order of patches to make
this fix after the removal of unnecessary mce_available().


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at