Re: [RFC][PATCH] netconsole: avoid deadlock on printk from drivercode

From: David Miller
Date: Thu Aug 14 2008 - 18:15:19 EST


From: Pekka J Enberg <penberg@xxxxxxxxxxxxxx>
Date: Thu, 14 Aug 2008 16:44:32 +0300 (EEST)

> @@ -598,6 +598,7 @@
>
> spinlock_t lock;
> spinlock_t rx_lock;
> + spinlock_t tx_lock;
>
> chip_t chipset;
> u32 rx_config;

Why create a special purpose lock when the generic networking
already is taking a lock for you to proect the TX path?

Furthermore, as I just described in another reply, netpoll
already knows that it might need to trylock() attempt on this
lock in order to avoid the very deadlocks this thread is
about.
--
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/