[PATCH] DMAENGINE: too many kref_put calls

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-kernel@...>, <akpm@...>
Cc: <shannon.nelson@...>, <greg@...>, <hskinnemoen@...>, <dan.j.williams@...>
Date: Friday, October 26, 2007 - 7:56 pm

When a channel is removed from dmaengine, too many kref_put() calls
are made and the device removal happens too soon, usually causing
a panic.

Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
---

 drivers/dma/dmaengine.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c
index 84257f7..245da53 100644
--- a/drivers/dma/dmaengine.c
+++ b/drivers/dma/dmaengine.c
@@ -134,8 +134,7 @@ static void dma_async_device_cleanup(struct kref *kref);
 
 static void dma_dev_release(struct device *dev)
 {
-	struct dma_chan *chan = to_dma_chan(dev);
-	kref_put(&chan->device->refcount, dma_async_device_cleanup);
+	return;
 }
 
 static struct class dma_devclass = {
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] DMAENGINE: too many kref_put calls, Shannon Nelson, (Fri Oct 26, 7:56 pm)
Re: [PATCH] DMAENGINE: too many kref_put calls, Haavard Skinnemoen, (Sat Oct 27, 9:28 am)
Re: [PATCH] DMAENGINE: too many kref_put calls, Al Viro, (Sat Oct 27, 2:40 am)