Re: [BUG] znet.c sleeping function called from invalid context
From: Mike Frysinger
Date: Wed Oct 07 2009 - 14:46:31 EST
On Wed, Oct 7, 2009 at 14:47, Alexander Strakh wrote:
> Â Â Â ÂKERNEL_VERSION: 2.6.31
> Â Â Â ÂDESCRIBE:
> Driver drivers/net/znet.c might sleep in atomic context, because it calls
> free_dma under claim_dma_lock:
>
> .drivers/net/znet.c:
> Â168 static int znet_request_resources (struct net_device *dev)
> ...
> Â189 Â Â Â Âflags = claim_dma_lock();
> Â190 Â Â Â Âfree_dma (znet->tx_dma);
> Â191 Â Â Â Ârelease_dma_lock (flags);
> ...
>
> Path to might_sleep macro from znet_request_resources:
> 1. znet_request_resources calls free_dma at
> arch/blackfin/kernel/bfin_dma_5xx.c:181
> 2. free_dma calls arch/blackfin/kernel/bfin_dma_5xx.c:195
i dont think we need the dmalock mutex. it's only used to protect
read/writes to .chan_status, and that should be atomic already.
-mike
--
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/