Re: [PATCH v2 3/7] [PATCH 3/8] can: CAN Network device driver andNetlink interface

From: Andrew Morton
Date: Wed May 13 2009 - 12:00:28 EST


On Wed, 13 May 2009 13:37:16 +0200 Wolfgang Grandegger <wg@xxxxxxxxxxxxxx> wrote:

> > Also, I wonder if it's safe to take netif_tx_lock() from a timer
> > handler when other parts of the code might be taking it from process
> > context (I didn't check).
> >
> > lockdep should be able to detect this, and I trust this code has been
> > fully runtime tested with lockdep enabled?
>
> Well, CONFIG_PROVE_LOCKING would be cool, but I'm unable to enabled it
> for my MPC5200 test system. Only 64bit PowerPC's seem to support
> TRACE_IRQFLAGS_SUPPORT. I'm going to test the code on a PC as well.

I discussed this off-list with Peter Zijlstra and Johannes Berg.
Apparently lockdep _will_ detect this deadlockable situation - Johannes
recently added the capability because he had the same situation in
wireless code somewhere.

But of course it does require that the timer handler has executed at
least once. Many handlers in the kernel never fire in normal operation.

--
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/