]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Mailbox: flush pending deferred works before freeing blk queue
authorFernando Guzman Lugo <x0095840@ti.com>
Sat, 13 Feb 2010 01:07:14 +0000 (19:07 -0600)
committerHiroshi DOYU <Hiroshi.DOYU@nokia.com>
Wed, 4 Aug 2010 12:50:15 +0000 (15:50 +0300)
flush pending deferred works before freeing blk_queue to prevent
any attempt of access to blk_queue after it was freed

Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
arch/arm/plat-omap/mailbox.c

index 252a58698ef78abfabf2a50cae460a82555ad7ca..77c23f5a003750fdecf28f17d4ddab06a2ed3258 100644 (file)
@@ -299,6 +299,8 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
 static void omap_mbox_fini(struct omap_mbox *mbox)
 {
        free_irq(mbox->irq, mbox);
+       tasklet_kill(&mbox->txq->tasklet);
+       flush_work(&mbox->rxq->work);
        mbox_queue_free(mbox->txq);
        mbox_queue_free(mbox->rxq);