Re: [PATCH] macb: Add support of the netpoll API

David Miller
2009-04-17T09:08:49Z

From: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Date: Fri, 17 Apr 2009 11:07:03 +0200

> David Miller wrote:
>> And in response to this Haavard explained the potential deadlock
>> (sorry I deleted that email) and suggested to use local_irq_save()
>>
>> But that won't work either, because it doesn't prevent the interrupt
>> handler from running on other cpus, it only prevents that on the
>> local cpu.
>
> The interrupt handler takes bp->lock. Isn't that sufficient to prevent
> it from running on other cpus?

We don't necessarily hold bp->lock here, we could be called from
the netpoll code. Another cpu could easily hold bp->lock and be
in the middle of the interrupt handler.