[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20060801011033.4c3484df.akpm@osdl.org>
Date: Tue, 1 Aug 2006 01:10:33 -0700
From: Andrew Morton <akpm@...l.org>
To: David Miller <davem@...emloft.net>
Cc: dan.j.williams@...el.com, linux-kernel@...r.kernel.org,
neilb@...e.de, galak@...nel.crashing.org,
christopher.leech@...el.com, alan@...rguk.ukuu.org.uk
Subject: Re: [PATCH rev2 1/4] dmaengine: enable mutliple clients and
operations
On Mon, 31 Jul 2006 23:11:58 -0700 (PDT)
David Miller <davem@...emloft.net> wrote:
>
> Can I ask that the known bugs in the I/O AT DMA code be fixed
> before we start adding new features to it?
>
> Specifically, the lock_cpu_hotplug() call in net_dma_rebalance()
> is still there and being invoked with a spinlock held. The
> spinlock is grabbed by the caller, netdev_dma_event() which
> grabs the net_dma_event_lock spinlock.
>
> You cannot invoke lock_cpu_hotplug() while holding a spinlock
> because lock_cpu_hotplug(), as seen in kernel/cpu.c, takes
> a semaphore which can sleep. Sleeping while holding a spinlock
> is not allowed.
>
> This is the second time I have tried to make the Intel developers
> aware of this bug. So please fix this problem.
>
Please just delete the lock_cpu_hotplug()/unlock_cpu_hotplug() calls. Any
code which runs inside preempt_disable() is automatically protected from
cpu hot-unplug.
It's not presently 100% protected against cpu hot-add, but it's good enough
for now: the setting of the flag in cpu_online_map is the last thing which
happens. To make this 100% tight we should probably run __cpu_up() via
stop_machine_run().
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists