Re: [PATCH 3/9] [I/OAT] Setup the networking subsystem as a DMA client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Chris Leech <[email protected]>
Date: Tue, 23 May 2006 17:20:15 -0700

> +static void net_dma_rebalance(void)
> +{
> +	unsigned int cpu, i, n;
> +	struct dma_chan *chan;
> +
> +	lock_cpu_hotplug();

You can't call lock_cpu_hotplug(), because that sleeps and takes
semaphores and we currently hold a spinlock taken here:

> +static void netdev_dma_event(struct dma_client *client, struct dma_chan *chan,
> +	enum dma_event event)
> +{
> +	spin_lock(&net_dma_event_lock);
> +	switch (event) {
> +	case DMA_RESOURCE_ADDED:
> +		net_dma_count++;
> +		net_dma_rebalance();
> +		break;

You'll need to run this DMA rebalancing asynchronously in process
context via keventd or similar to deal with this locking bug.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux