mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@avionic-design.de>
To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: haavard.skinnemoen@atmel.com, linux-kernel@vger.kernel.org,
	dan.j.williams@intel.com
Subject: [PATCH v2] dmaengine: Fix oops on dmatest module unload.
Date: Thu, 12 Feb 2009 13:30:11 +0100	[thread overview]
Message-ID: <1234441811-9628-1-git-send-email-thierry.reding@avionic-design.de> (raw)
In-Reply-To: <20090212.204840.124087545.nemoto@toshiba-tops.co.jp>

This patch fixes an oops that happens when the dmatest module is unloaded. The
dma_release_channel() function is called on channels that have already been
cleaned up (and therefore freed) with dmatest_cleanup_channel().

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

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

diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 732fa1e..0fb053e 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -433,10 +433,10 @@ static void __exit dmatest_exit(void)
 
 	list_for_each_entry_safe(dtc, _dtc, &dmatest_channels, node) {
 		list_del(&dtc->node);
-		dmatest_cleanup_channel(dtc);
 		pr_debug("dmatest: dropped channel %s\n",
 			 dma_chan_name(dtc->chan));
 		dma_release_channel(dtc->chan);
+		dmatest_cleanup_channel(dtc);
 	}
 }
 module_exit(dmatest_exit);
-- 
tg: (8e49215..) adx/dma (depends on: adx/master)

  reply	other threads:[~2009-02-12 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-10  9:31 [PATCH] " Thierry Reding
2009-02-12 11:48 ` Atsushi Nemoto
2009-02-12 12:30   ` Thierry Reding [this message]
2009-02-13  0:12     ` [PATCH v2] " Dan Williams
2009-03-04 23:03       ` Dan Williams
2009-03-06 11:13         ` Atsushi Nemoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1234441811-9628-1-git-send-email-thierry.reding@avionic-design.de \
    --to=thierry.reding@avionic-design.de \
    --cc=anemo@mba.ocn.ne.jp \
    --cc=dan.j.williams@intel.com \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®